From: Tim Wood Date: Wed, 7 Nov 2012 23:07:32 +0000 (-0800) Subject: Adding comments on week definitions X-Git-Tag: 2.0.0~35^2~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45463a37b693ce59246ae988dcfcda6dadad274d;p=thirdparty%2Fmoment.git Adding comments on week definitions --- diff --git a/moment.js b/moment.js index 515b224ab..7dd060730 100644 --- a/moment.js +++ b/moment.js @@ -461,8 +461,8 @@ 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. } }; diff --git a/test/lang/en.js b/test/lang/en.js index 694222bee..e4891a5dd 100644 --- a/test/lang/en.js +++ b/test/lang/en.js @@ -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);