From ab7cef683322c39bf42e78f5387236ae8d6476e9 Mon Sep 17 00:00:00 2001 From: Dan Le Date: Fri, 22 Nov 2013 15:42:45 -0500 Subject: [PATCH] Support time series data represented in epoch time --- src/objects/axis/methods/_parseDate.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/objects/axis/methods/_parseDate.js b/src/objects/axis/methods/_parseDate.js index 13a32b5..b9bc281 100644 --- a/src/objects/axis/methods/_parseDate.js +++ b/src/objects/axis/methods/_parseDate.js @@ -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);