Update Luxon, remove workaround

This commit is contained in:
Florine W. Dekker 2022-04-21 09:12:07 +02:00
parent 667bec2263
commit 7f61a0cb06
Signed by: FWDekker
GPG Key ID: D3DCFAA8A4560BE0
3 changed files with 8 additions and 11 deletions

BIN
package-lock.json generated

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"name": "doomsday",
"version": "1.4.1",
"version": "1.4.2",
"description": "Test your mastery of Conway's Doomsday rule.",
"author": "Florine W. Dekker",
"browser": "dist/bundle.js",
@ -16,13 +16,13 @@
"deploy": "grunt deploy"
},
"dependencies": {
"luxon": "^2.3.1"
"luxon": "^2.3.2"
},
"devDependencies": {
"@types/luxon": "^2.3.1",
"grunt": "^1.4.1",
"grunt": "^1.5.2",
"grunt-cli": "^1.4.3",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-clean": "^2.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-focus": "^1.0.0",
@ -30,7 +30,7 @@
"grunt-webpack": "^5.0.0",
"ts-loader": "^9.2.8",
"typescript": "^4.6.3",
"webpack": "^5.70.0",
"webpack": "^5.72.0",
"webpack-cli": "^4.9.2"
}
}

View File

@ -285,8 +285,7 @@ class DoomsdayDate {
* @return the day of the week of the anchor of this `DoomsdayDate`'s century
*/
getCenturyAnchorString(): string {
// TODO: Support BCE years
return this.date.set({year: (this.getCentury() + 4) * 100, month: 4, day: 4}).setLocale("en-US").weekdayLong;
return this.date.set({year: this.getCentury() * 100, month: 4, day: 4}).setLocale("en-US").weekdayLong;
};
/**
@ -295,8 +294,7 @@ class DoomsdayDate {
* @return the day of the week of the anchor day of this `DoomsdayDate`'s year
*/
getYearAnchorString(): string {
// TODO: Support BCE years
return this.date.set({year: this.date.year + 400, day: 4, month: 4}).setLocale("en-US").weekdayLong;
return this.date.set({month: 4, day: 4}).setLocale("en-US").weekdayLong;
};
/**
@ -305,8 +303,7 @@ class DoomsdayDate {
* @return the day of the week of this `DoomsdayDate`
*/
getWeekdayString(): string {
// TODO: Support BCE years
return this.date.set({year: this.date.year + 400}).setLocale("en-US").weekdayLong;
return this.date.setLocale("en-US").weekdayLong;
};