]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Adding moment.fn.toDate to docs instead of moment.fn.native #165
authorTim Wood <washwithcare@gmail.com>
Fri, 3 Feb 2012 18:43:45 +0000 (10:43 -0800)
committerTim Wood <washwithcare@gmail.com>
Fri, 3 Feb 2012 18:43:45 +0000 (10:43 -0800)
sitesrc/docs.jade

index c4ae6801336549fdc37f232c7aeb189cc2710b5f..6dd1c85353f4d8d768e4fa7382fbcc2fea0456d3 100644 (file)
@@ -90,7 +90,7 @@ block content
         li
           a(href="#/display/diff") Difference
         li
-          a(href="#/display/native") Native Date
+          a(href="#/display/toDate") Native Javascript Date
         li
           a(href="#/display/valueOf") Value
         li
@@ -943,20 +943,26 @@ block content
         | a.diff(b, 'years', true) // 1.5
 
 
+      a(name="/display/toDate")
       a(name="/display/native")
       h3
-        span Native Date
+        span Native Javascript Date
       p To get the native Date object that Moment.js wraps, use 
-        code moment.fn.native
+        code moment.fn.toDate
         | .
-      pre moment([2007, 0, 29]).native(); // returns native Date object
+      pre moment([2007, 0, 29]).toDate(); // returns native Date object
+      p Note: 
+        code moment.fn.native
+        |  has been replaced by 
+        code moment.fn.toDate
+        |  and will be depreciated in the future.
 
 
       a(name="/display/valueOf")
       h3
         span Value
       p
-        code moment.fn.valueOf
+        code moment.fn.valueOf 
         | simply outputs the unix timestamp.
       pre moment(1318874398806).valueOf(); // 1318874398806