News for hackers. Stuff that matters.
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?

There are no comments on this comment yet.