home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
j
/
julian11.zip
/
DATEDIFF.C
< prev
next >
Wrap
Text File
|
1993-01-11
|
562b
|
20 lines
#include "julian.h"
// ===== D A T E _ D I F F
// Takes two dates and determines the number of days difference between them
//
// date1_stp - The date to be subtracted
// date2_stp - The date to be subtracted from
// format_stp - The date format (must be same as both date1_stp and
// date2_stp)
//
time_t date_diff(char *date1_stp, char *date2_stp, char *format_stp)
{
time_t time1, time2;
time1 = date_to_jul(date1_stp,format_stp);
time2 = date_to_jul(date2_stp,format_stp);
return((time2-time1)/DAY_SECS);
}