Use resolved locale for date formatting

This commit is contained in:
Jackson Harper
2023-01-17 16:18:09 +08:00
parent e31f2cbf08
commit e9981b0fd6

View File

@ -1,6 +1,6 @@
//https://github.com/you-dont-need/You-Dont-Need-Momentjs
const locale = 'en-US' //navigator?.language ?? 'en-US'
const locale = Intl.DateTimeFormat().resolvedOptions().locale || 'en-US'
export function formattedLongDate(rawDate: string): string {
return new Intl.DateTimeFormat(locale, {