MISC little stuff

This commit is contained in:
Adam Shaw
2014-02-03 14:58:18 -08:00
parent 016f43f2cc
commit a1c4f11f48
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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 ( ... )
+4 -4
View File
@@ -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])