From a1c4f11f48eb147381e10c9716043c42ecf921c8 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 3 Feb 2014 12:27:56 -0800 Subject: [PATCH] MISC little stuff --- demos/php/utils.php | 2 +- src/Calendar.js | 2 +- src/date-formatting.js | 2 +- src/moment-ext.js | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/demos/php/utils.php b/demos/php/utils.php index a42c7d7..33d09a2 100644 --- a/demos/php/utils.php +++ b/demos/php/utils.php @@ -116,7 +116,7 @@ function parseDateTime($string, $timezone=null) { // Ignored if string has a timezone offset in it. ); if ($timezone) { - // If our timezone was ignore above, force it. + // If our timezone was ignored above, force it. $date->setTimezone($timezone); } return $date; diff --git a/src/Calendar.js b/src/Calendar.js index bae1938..266372c 100644 --- a/src/Calendar.js +++ b/src/Calendar.js @@ -80,7 +80,7 @@ function Calendar(element, instanceOptions) { if (options.dayNamesShort) { langData._weekdaysShort = options.dayNamesShort; } - if (options.firstDay) { + if (options.firstDay != null) { var _week = createObject(langData._week); // _week: { dow: # } _week.dow = options.firstDay; langData._week = _week; diff --git a/src/date-formatting.js b/src/date-formatting.js index 729bc37..742661b 100644 --- a/src/date-formatting.js +++ b/src/date-formatting.js @@ -196,7 +196,7 @@ function chunkFormatString(formatStr) { var match; while ((match = chunker.exec(formatStr))) { - if (match[1]) { // a literal string instead [ ... ] + if (match[1]) { // a literal string inside [ ... ] chunks.push(match[1]); } else if (match[2]) { // non-zero formatting inside ( ... ) diff --git a/src/moment-ext.js b/src/moment-ext.js index 85c35f6..f6d76fb 100644 --- a/src/moment-ext.js +++ b/src/moment-ext.js @@ -9,7 +9,7 @@ var ambigTimeOrZoneRegex = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d // Creates a moment in the local timezone, similar to the vanilla moment(...) constructor, // but with extra features: // - ambiguous times -// - enhanced formatting (TODO) +// - enhanced formatting fc.moment = function() { return makeMoment(arguments); }; @@ -97,7 +97,7 @@ function FCMoment(config) { // chain the prototype to Moment's FCMoment.prototype = createObject(moment.fn); -// we need this because Moment's implementation will not copy of the ambig flags +// we need this because Moment's implementation will not copy over the ambig flags FCMoment.prototype.clone = function() { return makeMoment([ this ]); }; @@ -149,7 +149,7 @@ FCMoment.prototype.stripTime = function() { this._ambigTime = true; this._ambigZone = true; // if ambiguous time, also ambiguous timezone offset - this.year(a[0]) + this.year(a[0]) // TODO: find a way to do this in one shot .month(a[1]) .date(a[2]) .hours(0) @@ -180,7 +180,7 @@ FCMoment.prototype.stripZone = function() { this._ambigZone = true; - this.year(a[0]) + this.year(a[0]) // TODO: find a way to do this in one shot .month(a[1]) .date(a[2]) .hours(a[3])