comparing dates

hi

is there a c function in linux for comparing dates.

thanx in advance.

svh

what kind of date?
when using time_t, then difftime(time1, time2) will return the diff in seconds.

if you use struct tm then something like difftime(mktime(struct_tm1), mktime(struct_tm2)) would be possible.

Start with man getdate, then use Lazzar's suggestion of difftime.