Adam Shaw 9 gadi atpakaļ
vecāks
revīzija
514e69a7ed
2 mainītis faili ar 8 papildinājumiem un 1 dzēšanām
  1. 7 0
      src/moment-ext.js
  2. 1 1
      tests/automated/dayRender.js

+ 7 - 0
src/moment-ext.js

@@ -1,4 +1,11 @@
 
+/*
+GENERAL NOTE on moments throughout the *entire rest* of the codebase:
+All moments are assumed to be ambiguously-zoned unless otherwise noted,
+with the NOTABLE EXCEOPTION of start/end dates that live on *Event Objects*.
+Ambiguously-TIMED moments are assumed to be ambiguously-zoned by nature.
+*/
+
 var ambigDateOfMonthRegex = /^\s*\d{4}-\d\d$/;
 var ambigTimeOrZoneRegex =
 	/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/;

+ 1 - 1
tests/automated/dayRender.js

@@ -73,7 +73,7 @@ describe('dayRender', function() {
 			weekMode: 'fixed',
 			defaultDate: '2014-05-01',
 			dayRender: function(date, cell) {
-				if (date.isSame('2014-05-01')) {
+				if (date.format() === '2014-05-01') {
 					cell.addClass('mycustomclass');
 				}
 			}