upgrade the project

This commit is contained in:
PrinOrange
2024-04-03 22:08:27 +08:00
parent a615511139
commit ea3597d62f
313 changed files with 10677 additions and 7069 deletions

View File

@@ -2,8 +2,7 @@
* Convert the date format of YYYY-MM-DD to American writing
* @param date The date in format of YYYY-MM-DD.
*/
export const normalizeDate = (date: string): string => {
if (date == null) return "01 January, 1970";
export const normalizeDate = (date: string = "1970-01-01"): string => {
let [year, month, day] = date.split("-");
let month_num = parseInt(month);
let day_num = parseInt(day);