]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
toDate returns a copy of the internal date object
authorJonathan Gray <jonathan@pluslabs.org>
Thu, 19 May 2016 18:38:16 +0000 (11:38 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Tue, 14 Jun 2016 09:49:13 +0000 (02:49 -0700)
src/lib/moment/to-type.js

index 584348da9841730a5e73f152bbbaf46be86787e1..261225bc00548a22e1fe916700bf98c2ad3fc6fd 100644 (file)
@@ -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 () {