fix: time-pattern to MM-DD

This commit is contained in:
flx-sta 2024-09-18 17:41:58 -07:00
parent 99a60226b8
commit 0f97c83062
1 changed files with 12 additions and 23 deletions

View File

@ -1,18 +1,8 @@
//#region Interfaces/Types //#region Interfaces/Types
type Month = "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09" | "10" | "11" | "12";
type Day = type Day =
| "01" | Month
| "02"
| "03"
| "04"
| "05"
| "06"
| "07"
| "08"
| "09"
| "10"
| "11"
| "12"
| "13" | "13"
| "14" | "14"
| "15" | "15"
@ -32,7 +22,6 @@ type Day =
| "29" | "29"
| "30" | "30"
| "31"; | "31";
type Month = "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | "Jul" | "Aug" | "Sep" | "Oct" | "Nov" | "Dec";
/** /**
* Represents a season with its {@linkcode name}, * Represents a season with its {@linkcode name},
@ -42,10 +31,10 @@ type Month = "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | "Jul" | "Aug" | "Se
interface Season { interface Season {
/** The name of the season (internal use only) */ /** The name of the season (internal use only) */
name: string; name: string;
/** The start day and month of the season. Format `DD-MMM` */ /** The start day and month of the season. Format `MM-DD` */
start: `${Day}-${Month}`; start: `${Month}-${Day}`;
/** The end day and month of the season. Format `DD-MMM` */ /** The end day and month of the season. Format `MM-DD` */
end: `${Day}-${Month}`; end: `${Month}-${Day}`;
/** Collection of the messages to display (without the `i18next.t()` call!) */ /** Collection of the messages to display (without the `i18next.t()` call!) */
messages: string[]; messages: string[];
} }
@ -101,20 +90,20 @@ const commonSplashMessages = [
const seasonalSplashMessages: Season[] = [ const seasonalSplashMessages: Season[] = [
{ {
name: "Halloween", name: "Halloween",
start: "15-Sep", start: "09-15",
end: "31-Oct", end: "10-31",
messages: ["halloween.pumpkaboosAbout", "halloween.mayContainSpiders", "halloween.spookyScaryDuskulls"], messages: ["halloween.pumpkaboosAbout", "halloween.mayContainSpiders", "halloween.spookyScaryDuskulls"],
}, },
{ {
name: "XMAS", name: "XMAS",
start: "01-Dec", start: "12-01",
end: "26-Dec", end: "12-26",
messages: ["xmas.happyHolidays", "xmas.delibirdSeason"], messages: ["xmas.happyHolidays", "xmas.delibirdSeason"],
}, },
{ {
name: "New Year's", name: "New Year's",
start: "01-Jan", start: "01-01",
end: "31-Jan", end: "01-31",
messages: ["newYears.happyNewYear"], messages: ["newYears.happyNewYear"],
}, },
]; ];