feat: support 12 and 24 hour formats
This commit is contained in:
parent
de6c9bb7eb
commit
eb49450756
3 changed files with 14 additions and 2 deletions
11
utils/getPreferredTimeFormat.ts
Normal file
11
utils/getPreferredTimeFormat.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
export default (): "12" | "24" => {
|
||||
const format = settingLoad("timeFormat").timeFormat ?? "auto"
|
||||
|
||||
if (format == "12-hour") {
|
||||
return "12"
|
||||
} else if (format == "24-hour") {
|
||||
return "24"
|
||||
}
|
||||
|
||||
return "24"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue