Re:Posical, the Positivist Calendar for Python
by crux on Friday April 18, 2014 @07:31PM
(#7611873)
Good question. In the library, intercalary days are just their own month. So it would just be 2015-14-1.
[ Parent
| on HN ]
Re:Posical, the Positivist Calendar for Python
by userbinator on Friday April 18, 2014 @09:20PM
(#7612157)
In other words, there's actually a 14 month that either contains 1 or 2 days, both of which have no weekday associated with them?
I don't see how it would make things much easier, especially for timestamps in various date formats and date-input fields.
Re:Posical, the Positivist Calendar for Python
by toyg on Saturday April 19, 2014 @03:56AM
(#7612896)
Why? It's still three numeric digits. If anything, it would be much easier to calculate date validity. In Python:
acceptable_days = range(1,29)
if pickedMonth == 14:
acceptable_days = [1];
if isLeapYear(year): acceptable_days = [1,2]
# any future hack will just go here
if pickedDay not in acceptable_days or pickedMonth > 14:
raise InvalidDateException()
Compare this with anything we use today. Which code is simpler?