mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Use full timezone name.
This commit is contained in:
1 parent
2e4cc2229b
commit
068fa42ebf
1 file changed
+3
-3
@@ -119,13 +119,13 @@ export const utcWeekDayToLocaleWeekDay = (utcDay: WeekDay, utcTimeString: string
|
||||
return new Intl.DateTimeFormat('en', { weekday: 'short' }).format(now);
|
||||
};
|
||||
|
||||
export const localeTimezoneShortHand = () => {
|
||||
export const localeTimezoneName = () => {
|
||||
const options: Intl.DateTimeFormatOptions = {
|
||||
timeZoneName: 'long'
|
||||
timeZoneName: 'longGeneric'
|
||||
};
|
||||
|
||||
const dateWithTimezone = new Intl.DateTimeFormat('en', options).format(new Date());
|
||||
return dateWithTimezone.match(/\b([A-Z])/g).join('');
|
||||
return dateWithTimezone.split(', ')[1];
|
||||
};
|
||||
|
||||
export const isSameDay = (date1: Date, date2: Date) => {
|
||||
|
||||
Reference in new issue
Block a user