From c2b7f0b096080919ffe1ad573fafc5352337bc30 Mon Sep 17 00:00:00 2001 From: Jamie Gaskins Date: Wed, 7 Apr 2021 14:25:39 -0400 Subject: [PATCH] Use 2-digit month and day for JS Date class (#13257) Single-digit months and days are not compliant with the ECMAScript standard for date strings. See: https://262.ecma-international.org/11.0/#sec-date-time-string-format --- app/javascript/analytics/dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/analytics/dashboard.js b/app/javascript/analytics/dashboard.js index 52faf5e11..774f93891 100644 --- a/app/javascript/analytics/dashboard.js +++ b/app/javascript/analytics/dashboard.js @@ -223,7 +223,7 @@ function drawMonthCharts({ organizationId, articleId }) { function drawInfinityCharts({ organizationId, articleId }) { resetActive(document.getElementById('infinity-button')); // April 1st is when the DEV analytics feature went into place - const beginningOfTime = new Date('2019-4-1'); + const beginningOfTime = new Date('2019-04-01'); callAnalyticsAPI(beginningOfTime, '', { organizationId, articleId }); }