diff --git a/lib/parser.js b/lib/parser.js index a5c3fa4..a1c1929 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -53,7 +53,7 @@ function parser(str, offset) { while (this.advance() !== 'eos'); debug('tokens %j', this.tokens) this.nextTime(d); - if (this.date.date == d) throw new Error('Invalid date'); + if (this.date.date - d === 0) throw new Error('Invalid date'); return this.date.date; };