This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Add integers to given date?


>a method to add a number of days to a given date in c

from Plauger, "The Standard C Library,"

"..the only reliable way to modify a calendar time is to convert it to a
broken-down time by calling localtime(), modify the appropriate members, then
convert the result back to a calendar time by calling mktime()."

So I hope that someone can explain a good way around this problem.
Tim Prince
tprince@computer.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]