home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
j
/
julian11.zip
/
DATEPLUS.C
< prev
next >
Wrap
Text File
|
1993-01-11
|
646b
|
21 lines
#include "julian.h"
// ===== D A T E _ P L U S
// Takes a date and adds or subtracts a number of days from it and returns
// a new date in the same format.
//
// dateret_stp - the date string returned
// date_stp - the date to added/subtracted to/from
// format_stp - The date (must be same as date_stp and will be the format
// of dateret_stp
// days - the days to add/subtract
//
int date_plus(char *dateret_stp,char *date_stp,char *format_stp,time_t days)
{
time_t tosecs;
tosecs = date_to_jul(date_stp,format_stp);
tosecs+=(days*DAY_SECS);
date_fm_jul(dateret_stp,tosecs,format_stp);
}