GNOME Bugzilla – Bug 548102
Add support for workweeks beginning on Sunday to reports
Last modified: 2008-08-21 09:27:59 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... :-)
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 :)
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).
A different approach would be to just ask the user - a lot of applications just let the user choose the first day of week.
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.