ccf4d1eeec
Implement date formatting per workspace member settings We'll need another round to maybe initialize all workspaces on the default settings. For now the default behavior is to take system settings if nothing is found in DB. --------- Co-authored-by: Weiko <corentin@twenty.com>
11 lines
548 B
TypeScript
11 lines
548 B
TypeScript
import { formatTimeZoneLabel } from '@/localization/utils/formatTimeZoneLabel';
|
|
import { AVAILABLE_TIME_ZONE_OPTIONS_BY_LABEL } from '@/settings/accounts/constants/AvailableTimezoneOptionsByLabel';
|
|
|
|
/**
|
|
* Finds the matching available IANA time zone select option from a given IANA time zone.
|
|
* @param value the IANA time zone to match
|
|
* @returns the matching available IANA time zone select option or undefined
|
|
*/
|
|
export const findAvailableTimeZoneOption = (value: string) =>
|
|
AVAILABLE_TIME_ZONE_OPTIONS_BY_LABEL[formatTimeZoneLabel(value)];
|