7 ms·
Good to see we're starting to come close to getting dates and times handled according to the rules (I won't say sensibly, because the rules themselves aren't se
by Shish2k 10y ago
Good to see we're starting to come close to getting dates and times handled according to the rules (I won't say sensibly, because the rules themselves aren't sensible). But then we start over-reaching and trying to handle social constructs built on top of dates and times, which is even more of a mess D:
Eg, spot the error:
_weekend_days = [SATURDAY, SUNDAY]
date.is_weekend = date.day in _weekend_days
Hint: https://en.wikipedia.org/wiki/Workweek_and_weekend#Around_the_world https://en.wikipedia.org/wiki/Workweek_and_weekend#Around_th...
(TIL one country doesn't even have consecutive weekend days)
- sdispater 10y agoI agree but this is an optional feature which might cover most of the developers needs. But, if not, it's configurable: pendulum.set_weekend_days([pendulum.SUNDAY])