yet-another-speed-dial icon indicating copy to clipboard operation
yet-another-speed-dial copied to clipboard

Feature request - 24 hour format

Open mysiak opened this issue 2 years ago • 8 comments

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!

mysiak avatar Feb 14 '23 16:02 mysiak

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

kajoken avatar Nov 28 '23 08:11 kajoken

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

vp-priv avatar Dec 08 '23 12:12 vp-priv

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.

kajoken avatar Dec 08 '23 13:12 kajoken

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;
}

mysiak avatar Dec 08 '23 17:12 mysiak

fixed in 2.5.5, thank u @mysiak

conceptualspace avatar Mar 13 '24 00:03 conceptualspace

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

kajoken avatar Apr 01 '24 11:04 kajoken

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

conceptualspace avatar Apr 04 '24 17:04 conceptualspace