Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - 24 hour format #79

Open
mysiak opened this issue Feb 14, 2023 · 7 comments
Open

Feature request - 24 hour format #79

mysiak opened this issue Feb 14, 2023 · 7 comments

Comments

@mysiak
Copy link

mysiak commented Feb 14, 2023

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
Copy link

kajoken commented Nov 28, 2023

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

@vp-priv
Copy link

vp-priv commented Dec 8, 2023

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

@kajoken
Copy link

kajoken commented Dec 8, 2023

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
Copy link
Author

mysiak commented Dec 8, 2023

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
Copy link
Owner

conceptualspace commented Mar 13, 2024

fixed in 2.5.5, thank u @mysiak

@kajoken
Copy link

kajoken commented Apr 1, 2024

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

@conceptualspace
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants