Closed ghost closed 4 months ago
Can you test it?
Thanks. Fixed.
Is this still working? When I run with the LC_ALL=tr_TR
I still get Sunday as the first day
Seems broken now.
Yeah, I have no idea how to reliably get the first day of the week. If you know how, please let me know.
I see two examples that seems the same or similar.
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/src/shell-util.c?ref_type=heads#L79-135
From Evolution
I understand very little of this code. The calculation seems to be correct (I think..)
The problem is figuring it out the week number of the current locale (I'm using 1, October 2000) this day for me is on week 40, for you it should be week 39.
It's always gives 40 as the result now, before it gave 39 when I changed the locale, I didn't change anything in the code and somehow it stopped working so ¯_(ツ)_/¯
Could you use different date. E.g: 1, October 2017. Turkish timezone and daylight saving changed around 2016.
I could try to tackle this.
Could you use different date. E.g: 1, October 2017. Turkish timezone and daylight saving changed around 2016.
Doesn't seem to make a difference.
I could try to tackle this.
@erklyn That's the function: https://github.com/diegopvlk/Dosage/blob/66b505db40431d988ed25f3499c4e765310ff28e/src/utils.js#L15-L24
If you manage to fix it, please open a PR.
Also make sure to backup your data before running the latest commit, I change some stuff and I didn't test everything properly yet, so it may cause some data loss.
@diegopvlk looks fine and works fine on my system as well, returns 39 for me I am an in Turkey so works correctly.
there might be an issue on the button part. I'll take a look as soon as possible and post a pr.
@erklyn It's not the button, you can test it by just returning false instead.
What's your output of locale
?
Turns out there is a very simple command to check the first weekday: locale first_weekday
🤦♂️
In Turkish and some other countries, the first day of the week is Monday (meaning Pazartesi).
GNOME Calendar uses the correct format for this.
On the other hand, Dosage starts the week from Monday.
You may check the following article for more information: https://www.timeanddate.com/calendar/days/