|
Re: Help
Calculating the number of days between dates can be very tricky, especially if one of the two dates is before the gregorian calendar was invented. If you limit the two dates to be after 1970 then you can use the functions in time.h. create an object of struct tm, fill in the date, them call mktime() to get the number of seconds. Do the same for the second date. Then call datediff() to return the difference.
|