Hacker News new | ask | show | jobs
by DonaldFisk 1390 days ago
How difficult is it to either subtract 1 before indexing your array, or have a 13 element array with a dummy value in element 0? Deprecate time.h and adopt ISO 8601 already.
2 comments

Or put Dec a second time, at 0, and then % 12 works.
About as difficult as it is to add 1 before printing the month as a number.