implemented user-adding

This commit is contained in:
z1glr
2025-01-11 16:12:02 +00:00
parent 4f203704a6
commit 059d14acc4
16 changed files with 658 additions and 334 deletions

View File

@@ -1,3 +1,5 @@
import { DateFormatter as IntlDateFormatter } from "@internationalized/date";
type QueryParams = Record<string, string | { toString(): string }>;
export type APICallResult<T extends object> = Response & {
@@ -66,3 +68,15 @@ export function classNames(classNames: Record<string, boolean>): string {
})
.join(" ");
}
export class DateFormatter {
private formatter;
constructor(locale: string, options?: Intl.DateTimeFormatOptions) {
this.formatter = new IntlDateFormatter(locale, options);
}
format(dt: Date) {
return this.formatter.format(dt);
}
}