Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Commit

Permalink
fix tests for node 4
Browse files Browse the repository at this point in the history
  • Loading branch information
SerayaEryn committed Aug 23, 2018
1 parent c79b9d3 commit cd352bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DateFormatter.js
Expand Up @@ -34,7 +34,7 @@ DateFormatter.prototype.format = function format(dateFormat, date) {
function buildFormatter(dateFormat) {
var tokens = tokenizer.tokenize(dateFormat);
var functionString = '';
if (tokens.includes('Z') || tokens.includes('ZZ')) {
if (tokens.indexOf('Z') != -1 || tokens.indexOf('ZZ') != -1) {
functionString += 'var offset = now.getTimezoneOffset();\n';
}
functionString += 'return `' + tokens.map(processToken).join('') + '`';
Expand Down

0 comments on commit cd352bb

Please sign in to comment.