website refactor

This commit is contained in:
2026-01-21 13:49:59 +01:00
parent 69c9305d59
commit ac37871bef
11 changed files with 280 additions and 338 deletions

View File

@@ -35,4 +35,15 @@ export class DateDisplay {
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
return `${months[d.getUTCMonth()]} ${d.getUTCDate()}`;
}
/**
* Formats a date as "Jan 18, 15:00" using UTC.
*/
static formatDateTime(date: string | Date): string {
const d = typeof date === 'string' ? new Date(date) : date;
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
const hours = d.getUTCHours().toString().padStart(2, '0');
const minutes = d.getUTCMinutes().toString().padStart(2, '0');
return `${months[d.getUTCMonth()]} ${d.getUTCDate()}, ${hours}:${minutes}`;
}
}