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
This commit is contained in:
Jamie Gaskins 2021-04-07 14:25:39 -04:00 committed by GitHub
parent d5637105c0
commit c2b7f0b096
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 });
}