Merge pull request #27 from dule/master

Support time series data represented in epoch time
master
John Kiernander 2013-11-22 14:22:39 -08:00
commit 5cb73e7fd4
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);