From 824172d1d361aff2d18490a2278609a33e8266da Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 25 Aug 2020 13:19:49 +0300 Subject: [PATCH] Birthday calendar: prepend '19' to double-digit birth years. Without this we were creating malformed dates. --- src/SyncGate.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SyncGate.tsx b/src/SyncGate.tsx index 6b4f925..f4de697 100644 --- a/src/SyncGate.tsx +++ b/src/SyncGate.tsx @@ -102,7 +102,7 @@ const syncInfoSelector = createSelector( if (bdayTime === {} || bdayTime.month === undefined) { return; } - const year = bdayTime.year ?? 1900; + const year = (bdayTime.year ?? 1900).toString().padStart(4, "19"); // XXX The padding is a hack to fix malformed dates const month = (bdayTime.month + 1).toString().padStart(2, "0"); const day = bdayTime.day.toString().padStart(2, "0");