Prevent day-of-month overflow

Fixes #1. See comments in #1 for more information about this fix.
This commit is contained in:
Florine W. Dekker 2020-02-04 18:18:19 +01:00
parent 6acbeae358
commit 82adb32c17
Signed by untrusted user: FWDekker
GPG Key ID: B1B567AF58D6EE0F
1 changed files with 1 additions and 1 deletions

View File

@ -319,8 +319,8 @@
*/
getYearAnchorString() {
const anchorDate = new Date(this.date);
anchorDate.setMonth(3); // April
anchorDate.setDate(4); // 4th
anchorDate.setMonth(3); // April
return DoomsdayDate.dayNumberToString(anchorDate.getDay());
};