getting the next day's day, month, year etc
Hello,
well, I know that you can get the current time with time() function, but after you get the tm structure, how do you easily get the days, months etc for the next day?
mktime function adjusts based on the day of the month supplied, etc, not based on the amount of days after the beginning of the year etc..
Is the only possible way to get the next day of a date, by getting the time_t value (seconds after the unix date on 1970), adding 86400 (24 hours x 60 minutes x 60 seconds), and converting the number back to the tm structure?
It just seems a bit hacky, please tell me there's a more elegant way :D
also, while I'm at it.. does the time.h header support things such as leap years, leap seconds (even) etc ?
cheers