Python: Convention for date with no year -


i have script looks @ list of birthdays , calculates age. birthdays have year, month, day , have month, day.

for ones years, have dob = date(year, month, day)

but ones without years, appropriate convention storing date, since date() requires year argument?

right i'm saying without birth year born in year 1500 (so can @ least identify them later on), it's stupid solution.

if there no year; don't use datetime.date class. date must have year. either compute date field on fly everytime need if year present, and/or make self.date property on custom object raise error if used object without year.


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -