Moment objects have several internal properties that are prefixed with
The most commonly viewed internal property is the
Frequently, developers are confused by console output of the value of
Moment uses a technique called epoch shifting that causes this property to sometimes differ from the actual date value that the Moment reflects.
In particular if Moment TimeZone is in use, this property will almost never be the same as the actual value that Moment will output from its public
As such, the values of
_d and any other properties prefixed with
_ should not be used for any purpose.
To print out the value of a Moment, use
To retrieve a native Date object from Moment, use
.toDate(). This function returns a properly shifted date for interaction with third party APIs.