From: Jonathan Gray Date: Thu, 19 May 2016 18:38:16 +0000 (-0700) Subject: toDate returns a copy of the internal date object X-Git-Tag: 2.14.0~22^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4b4efec9622bfb69eae49fd350fe6f19c31f897;p=thirdparty%2Fmoment.git toDate returns a copy of the internal date object --- diff --git a/src/lib/moment/to-type.js b/src/lib/moment/to-type.js index 584348da9..261225bc0 100644 --- a/src/lib/moment/to-type.js +++ b/src/lib/moment/to-type.js @@ -7,7 +7,7 @@ export function unix () { } export function toDate () { - return this._offset ? new Date(this.valueOf()) : this._d; + return this._offset ? new Date(this.valueOf()) : new Date(this._d); } export function toArray () {