We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a4bc26 commit b519502Copy full SHA for b519502
lib/timestamp.ts
@@ -41,7 +41,7 @@ export function timestampFactory(defaultTimeZone: string) {
41
const match = str.match(timestamp.test);
42
if (!match) { throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd'); }
43
const [, year, month, day, hour, minute, second] = match.map(Number);
44
- const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;
+ const millisec = match[7] ? Number((match[7] + '00').substring(1, 4)) : 0;
45
46
let date = Date.UTC(
47
year,
0 commit comments