Initial commit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { TimeMode } from '@crux-kit/types';
|
||||
|
||||
export const detectUserTimeMode = (): TimeMode => {
|
||||
return new Intl.DateTimeFormat(undefined, {
|
||||
hour: 'numeric',
|
||||
}).resolvedOptions().hour12
|
||||
? '12h'
|
||||
: '24h';
|
||||
};
|
||||
Reference in New Issue
Block a user