]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Adding isDST documentation #82
authorTim Wood <washwithcare@gmail.com>
Thu, 1 Dec 2011 18:55:10 +0000 (10:55 -0800)
committerTim Wood <washwithcare@gmail.com>
Thu, 1 Dec 2011 18:55:10 +0000 (10:55 -0800)
sitesrc/docs.jade

index 7f7eac5a880f0f9dbb740167953f6dd125ccabde..a6e5a686d38989455b0fb787d992d3736e76715d 100644 (file)
@@ -97,6 +97,8 @@ block content
           a(href="#/display/leapyear") Leap Year
         li
           a(href="#/display/zone") Timezone Offset
+        li
+          a(href="#/display/dst") Daylight Savings Time
       h2
         a(href="#/i18n")
           span I18N
@@ -837,6 +839,16 @@ block content
       pre moment().zone(); // get the timezone offset in minutes (60, 120, 240, etc.)
 
 
+      a(name="/display/dst")
+      h3
+        span Daylight Savings Time
+      p
+        code moment.fn.isLeapYear
+        |  checks if the current moment is in daylight savings time or not.
+      pre moment([2011, 2, 12]).isDST(); // false, March 12 2011 is not DST\n
+        | moment([2011, 2, 14]).isDST(); // true, March 14 2011 is DST
+
+
       a(name="/i18n")
       h2
         span I18N