conceptualspace / yet-another-speed-dial

a modern speed dial for chrome, edge and firefox
Other
177 stars 32 forks source link

Feature request - 24 hour format #79

Open mysiak opened 1 year ago

mysiak commented 1 year ago

Could you please add an option to choose 24-hour format of the clock? Per the source code it seems that English locale forces 12 hours format automatically - please allow to override this behaviour. :) Thanks!

kajoken commented 10 months ago

Doesn't look like this is very high on the priority list but I'd like to second ops request.

vp-priv commented 9 months ago

it works for me - having 13:15 now - but I have W10 with central european settingd

kajoken commented 9 months ago

Interesting. I have version 2.5.3 in Firefox and 2.5.4 in Chrome and both browsers show AM/PM even though my system Format is 24-hour. Win 11, UTC+1.

mysiak commented 9 months ago

For some strange reason only non-english locale is compared with system settings. As soon as the system language is English, the clock is forced to 12h format.

Problematic piece of code:

// detect clock settings
if (!locale.startsWith("en")) {
    hourCycle = Intl.DateTimeFormat(locale, {hour: 'numeric'}).resolvedOptions().hourCycle;
}
conceptualspace commented 6 months ago

fixed in 2.5.5, thank u @mysiak

kajoken commented 5 months ago

Updated to 2.5.5 in Chromium, still not working. It's still AM/PM for me.

conceptualspace commented 5 months ago

yasd determines the format to show based on the system locale; this generally shows the right output but is not always accurate (unexpected output could be the result of a different localization setting in the browser, language setting that is different than the region, etc). i'll add a toggle in the settings for the clock in the next release