I have a double variable holding the number of seconds from the current time to when time_t wraps around (an exercise from the book Expert C Programming), and I need to convert it to years, months, weeks, days, hours and minutes.
How would you do such a thing when you need to take into account for leap years?