feat: commit ai-produced frontend first
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
export const MONTH_NAMES: string[] = [
|
||||
'January', 'February', 'March', 'April', 'May', 'June',
|
||||
'July', 'August', 'September', 'October', 'November', 'December'
|
||||
];
|
||||
|
||||
export const WEEK_NAMES: string[] = [
|
||||
'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'
|
||||
];
|
||||
+15
-50
@@ -3,64 +3,29 @@ export enum Language {
|
||||
SimplifiedChinese,
|
||||
}
|
||||
|
||||
export const MONTH_NAMES: string[] = [
|
||||
"January", "February", "March", "April", "May", "June",
|
||||
"July", "August", "September", "October", "November", "December"
|
||||
];
|
||||
|
||||
export const WEEK_NAMES: string[] = [
|
||||
"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
|
||||
];
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param month Zero-based month.
|
||||
* @returns
|
||||
* @returns
|
||||
*/
|
||||
export function universalGetMonth(month: number): string {
|
||||
switch (month) {
|
||||
case 0:
|
||||
return "January";
|
||||
case 1:
|
||||
return "February";
|
||||
case 2:
|
||||
return "March";
|
||||
case 3:
|
||||
return "April";
|
||||
case 4:
|
||||
return "May";
|
||||
case 5:
|
||||
return "June";
|
||||
case 6:
|
||||
return "July";
|
||||
case 7:
|
||||
return "August";
|
||||
case 8:
|
||||
return "September";
|
||||
case 9:
|
||||
return "October";
|
||||
case 10:
|
||||
return "November";
|
||||
case 11:
|
||||
return "December";
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
return MONTH_NAMES[month] ?? "";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param dayOfWeek Zero-based day of week
|
||||
* @returns
|
||||
* @returns
|
||||
*/
|
||||
export function universalGetDayOfWeek(dayOfWeek: number): string {
|
||||
switch (dayOfWeek) {
|
||||
case 0:
|
||||
return "Monday";
|
||||
case 1:
|
||||
return "Tuesday";
|
||||
case 2:
|
||||
return "Wednesday";
|
||||
case 3:
|
||||
return "Thursday";
|
||||
case 4:
|
||||
return "Friday";
|
||||
case 5:
|
||||
return "Saturday";
|
||||
case 6:
|
||||
return "Sunday";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
return WEEK_NAMES[dayOfWeek] ?? "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user