add nova
This commit is contained in:
11
nova/resources/js/util/hourCycle.js
Normal file
11
nova/resources/js/util/hourCycle.js
Normal file
@@ -0,0 +1,11 @@
|
||||
export default function (locale) {
|
||||
let hourCycle = Intl.DateTimeFormat(locale, {
|
||||
hour: 'numeric',
|
||||
}).resolvedOptions().hourCycle
|
||||
|
||||
if (hourCycle == 'h23' || hourCycle == 'h24') {
|
||||
return 24
|
||||
}
|
||||
|
||||
return 12
|
||||
}
|
||||
Reference in New Issue
Block a user