After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 548102 - Add support for workweeks beginning on Sunday to reports
Add support for workweeks beginning on Sunday to reports
Status: RESOLVED FIXED
Product: hamster-applet
Classification: Deprecated
Component: general
2.23.x
Other All
: Normal enhancement
: ---
Assigned To: hamster-applet-maint
hamster-applet-maint
Depends on:
Blocks:
 
 
Reported: 2008-08-17 08:42 UTC by Roni Yaniv
Modified: 2008-08-21 09:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Roni Yaniv 2008-08-17 08:42:14 UTC
Since I'm working in Israel, where Sunday is the first day of the week, I'd like to see my reports beginning on Sunday too... :-)
Comment 1 Toms Bauģis 2008-08-20 23:14:52 UTC
Thanks for the report, Roni!

After googling for couple of hours didn't find a proper (python) way determining the locale setting for first day of week.

typing "locale first_weekday" in terminal, gives back the day (1=sunday, 2=monday, and so on), but i wonder if doing os.popen("locale first_weekday") would really be the proper way.

Patryk - any ideas? Any way or other, we should get this in before the final release, otherwise we will get plenty of me-toos here :)
Comment 2 Patryk Zawadzki 2008-08-21 00:07:03 UTC
Went through the whole documentation for datetime and locale modules and even through parts of python's source code. Nada. Null. Zero. I guess we have to stick to the subprocess solution for now (but please make it fail nicely and put it in a separate module so we can use the same solution for the soon-to-come command line client).
Comment 3 Roni Yaniv 2008-08-21 04:13:44 UTC
A different approach would be to just ask the user - a lot of applications just let the user choose the first day of week.
Comment 4 Toms Bauģis 2008-08-21 09:27:59 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. 

Yay!
Didn't bother to puting it out in a separate module yet, because only place it is used, is in overview's week graph. 
Code is in stats.py and on failure falls back to monday.