Saturday 26 January 2019

Dates on Nodejs on Windows 10 seems a bit off.

This might be the the wrong forum for this, but someone knowledgeable in this might be able to answer this quick and clean. Either it's my system (or rather two of my systems). If this is the wrong place to ask this query, then I'll apologize and head over to stackoverflow.It's regarding Date .Example: new Date(2019,1,1) 2019-01-31T23:00:00.000Z This does not seem right. Trying around with moment I'll get the following. ``` let date = moment().subtract(1, 'month');console.log(date.startOf('month').toString()); console.log(date.startOf('month').toISOString());Sat Dec 01 2018 00:00:00 GMT+0100 2018-11-30T23:00:00.000Z ``` Is this some mad quirk in JavaScript v8, since I have yet to see another language behave this way.

Submitted January 26, 2019 at 04:07PM by Kylozor

No comments:

Post a Comment