Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, I have a Python script for personal use, and briefly could not figure out why it was crashing. The reason : I was using

class datetime.date(year, month, day)

which was attempting to generate "today, one year ago" by reusing the current month and day, but replacing the year with year-1.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: