|
|
@@ -116,7 +116,7 @@ function setYMD(date, y, m, d) {
|
|
|
/* Date Parsing
|
|
|
-----------------------------------------------------------------------------*/
|
|
|
|
|
|
-var parseDate = fc.parseDate = function(s) {
|
|
|
+var parseDate = fc.parseDate = function(s, ignoreTimezone) {
|
|
|
if (typeof s == 'object') { // already a Date object
|
|
|
return s;
|
|
|
}
|
|
|
@@ -127,7 +127,10 @@ var parseDate = fc.parseDate = function(s) {
|
|
|
if (s.match(/^\d+$/)) { // a UNIX timestamp
|
|
|
return new Date(parseInt(s) * 1000);
|
|
|
}
|
|
|
- return parseISO8601(s, true) || (s ? new Date(s) : null);
|
|
|
+ if (ignoreTimezone === undefined) {
|
|
|
+ ignoreTimezone = true;
|
|
|
+ }
|
|
|
+ return parseISO8601(s, ignoreTimezone) || (s ? new Date(s) : null);
|
|
|
}
|
|
|
// TODO: never return invalid dates (like from new Date(<string>)), return null instead
|
|
|
return null;
|