Support time series data represented in epoch time

master
Dan Le 2013-11-22 15:42:45 -05:00
parent d3ae295c1d
commit ab7cef6833
1 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,10 @@
this._parseDate = function (inDate) {
// A javascript date object
var outDate;
if (this.dateParseFormat === null || this.dateParseFormat === undefined) {
if (!isNaN(inDate)) {
// If inDate is a number, assume it's epoch time
outDate = new Date(inDate);
} else if (this.dateParseFormat === null || this.dateParseFormat === undefined) {
// If nothing has been explicity defined you are in the hands of the browser gods
// may they smile upon you...
outDate = Date.parse(inDate);