diff --git a/src/parser.ts b/src/parser.ts index b171b27..5591529 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -429,6 +429,10 @@ export default class Parser { } } + if (inputNumber.length>15) { + throw new ParseError(this.pos, 'Exceeded max length for a date value'); + } + return new Date(parseInt(inputNumber,10)*sign*1000); }