Enhance date and time format settings to reflect system preferences (#7274)
Closes https://github.com/twentyhq/twenty/issues/6880 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -5,6 +5,10 @@ export const detectTimeFormat = () => {
|
||||
const isHour12 = Intl.DateTimeFormat(navigator.language, {
|
||||
hour: 'numeric',
|
||||
}).resolvedOptions().hour12;
|
||||
if (isDefined(isHour12) && isHour12) return TimeFormat.HOUR_12;
|
||||
|
||||
if (isDefined(isHour12) && isHour12) {
|
||||
return TimeFormat.HOUR_12;
|
||||
}
|
||||
|
||||
return TimeFormat.HOUR_24;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user