From ff97c3eb5998cadc71e17a99da65a4b40f5d04d7 Mon Sep 17 00:00:00 2001 From: Christopher Schmidt Date: Tue, 13 Apr 2021 10:02:10 -0400 Subject: [PATCH 1/2] Change the split from being on " " to being on "," so that we don't get the trailing comma. --- src/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants.js b/src/constants.js index f5b47b69c..0c551d785 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1107,7 +1107,7 @@ const createConfigPresetValue = (line, fromStationName, toStationName, date_star }; // Returns today's EST/EDT date in a format like "2021-04-12". Thanks Canada! -const TODAY = new Date().toLocaleString('fr-CA', { timeZone: 'America/New_York' }).split(" ")[0]; +const TODAY = new Date().toLocaleString('fr-CA', { timeZone: 'America/New_York' }).split(",")[0]; export const configPresets = [ { From 34a4498ac98c63451cf228fcfb75b4369b72a7d6 Mon Sep 17 00:00:00 2001 From: Christopher Schmidt Date: Tue, 13 Apr 2021 10:10:25 -0400 Subject: [PATCH 2/2] Change to using an ISO date format instead. --- src/constants.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/constants.js b/src/constants.js index 0c551d785..eac8fbe07 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1106,8 +1106,7 @@ const createConfigPresetValue = (line, fromStationName, toStationName, date_star } }; -// Returns today's EST/EDT date in a format like "2021-04-12". Thanks Canada! -const TODAY = new Date().toLocaleString('fr-CA', { timeZone: 'America/New_York' }).split(",")[0]; +const TODAY = new Date().toISOString().split("T")[0]; export const configPresets = [ {