Birthday calendar: prepend '19' to double-digit birth years.

Without this we were creating malformed dates.
master
Tom Hacohen 4 years ago
parent 9e0b1efda9
commit 824172d1d3

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

Loading…
Cancel
Save