]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Adding comments on week definitions
authorTim Wood <washwithcare@gmail.com>
Wed, 7 Nov 2012 23:07:32 +0000 (15:07 -0800)
committerTim Wood <washwithcare@gmail.com>
Wed, 7 Nov 2012 23:07:32 +0000 (15:07 -0800)
moment.js
test/lang/en.js

index 515b224ab59fd34ed55a681c9a380a5d6b3a5b78..7dd0607301be54c024d6a39b2229392fd2146f0d 100644 (file)
--- a/moment.js
+++ b/moment.js
             return weekOfYear(mom, this._week.dow, this._week.doy);
         },
         _week : {
-            dow : 0,
-            doy : 6
+            dow : 0, // Sunday is the first day of the week.
+            doy : 6  // The week that contains Jan 1st is the first week of the year.
         }
     };
 
index 694222bee083e067856abff208680bcb98e4a090..e4891a5ddc8cdad71ab9d25c32a0dca9b1c4e79c 100644 (file)
@@ -269,6 +269,9 @@ exports["lang:en"] = {
         test.done();
     },
 
+    // Sunday is the first day of the week.
+    // The week that contains Jan 1st is the first week of the year.
+
     "weeks year starting sunday" : function(test) {
         test.expect(5);