Use python standard module to get weekdays #55

Closed
opened 2020-01-13 21:15:29 +01:00 by hansegucker · 8 comments
Owner

From @nik:

In [13]: locale.setlocale(locale.LC_ALL, "de_DE.UTF-8")
Out[13]: 'de_DE.UTF-8'

In [14]: list(enumerate(calendar.day_name))
Out[14]: 
[(0, 'Montag'),
 (1, 'Dienstag'),
 (2, 'Mittwoch'),
 (3, 'Donnerstag'),
 (4, 'Freitag'),
 (5, 'Samstag'),
 (6, 'Sonntag')]

In [18]: list(enumerate(calendar.day_abbr))
Out[18]: [(0, 'Mo'), (1, 'Di'), (2, 'Mi'), (3, 'Do'), (4, 'Fr'), (5, 'Sa'), (6, 'So')]
From @nik: ``` In [13]: locale.setlocale(locale.LC_ALL, "de_DE.UTF-8") Out[13]: 'de_DE.UTF-8' In [14]: list(enumerate(calendar.day_name)) Out[14]: [(0, 'Montag'), (1, 'Dienstag'), (2, 'Mittwoch'), (3, 'Donnerstag'), (4, 'Freitag'), (5, 'Samstag'), (6, 'Sonntag')] In [18]: list(enumerate(calendar.day_abbr)) Out[18]: [(0, 'Mo'), (1, 'Di'), (2, 'Mi'), (3, 'Do'), (4, 'Fr'), (5, 'Sa'), (6, 'So')] ```
Author
Owner

@nik Do we want use this order or the ISO standard?

@nik Do we want use this order or the ISO standard?
Owner

The order is ISO. It's just off by one. I think we should work zero-bssed.

The *order* is ISO. It's just off by one. I think we should work zero-bssed.
Owner

Uh... Caveat: This cannot be lazy-evaluated in an easy way...

Uh... Caveat: This cannot be lazy-evaluated in an easy way...
Owner

mentioned in commit 2f53941b17

mentioned in commit 2f53941b17ce2d5d2f760cee48baf02b2e86c0a3
Owner

mentioned in merge request !336

mentioned in merge request !336
Owner

Closed in favour of #56.

Closed in favour of #56.
Owner

closed

closed
Owner

Yes we can!

Yes we can!
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
aleksis/AlekSIS-App-Chronos#55
No description provided.