Hacker News new | past | comments | ask | show | jobs | submit login

tm_mon and tm_wday are 0-based because the expectation was you'll probably be using than as an index in a lookup table to get a month name (e.g., "Jan", "Feb", ...) or day name (e.g., "Sun", "Mon", ...).

For day of month, we don't have special names for them. We just use the day number. So tm_mday directly contains the day number.




That's right, but what about tm_yday then?




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

Search: