You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
The return value of Moment.valueOf() is not consistent with different versions of NodeJS.
It seems that the problem started since NodeJS version 10.4.0
To reproduce
Run following code with different NodeJS verions:
for (let i = 1800; i < 2000; i++) {
const dateStr = i + '-01-01';
console.log(moment(dateStr).valueOf() + ' ' + dateStr);
}
Expected behavior
I think that return value of Moment.valueOf() should be the same regardless of NodeJS version.
I think moment originally implemented its own ISO parsing to support IE, but guess this is an unwanted consequence, and could be avoided if moment feature-detected and used built-in ISO-parsing support where available.
Bug description
The return value of Moment.valueOf() is not consistent with different versions of NodeJS.
It seems that the problem started since NodeJS version 10.4.0
To reproduce
Run following code with different NodeJS verions:
Expected behavior
I think that return value of Moment.valueOf() should be the same regardless of NodeJS version.
Results from my computer:
moment.valueOf_on_node_8.16.1.txt
moment.valueOf_on_node_10.3.0.txt
moment.valueOf_on_node_10.4.0.txt
moment.valueOf_on_node_10.16.3.txt
Environment:
Moment-specific environment:
With NodeJS 8.16.1 the output is:
With NodeJS 10.16.3 the output is:
The text was updated successfully, but these errors were encountered: