home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
UDEL.ZIP
/
SFDT.H
< prev
next >
Wrap
Text File
|
1988-08-13
|
12KB
|
267 lines
/*****************************************************************************
* sfdt.h standart date / time function protypes *
* last change 01/23/88 *
*****************************************************************************/
struct dydif {
int year; /* year differance */
int days; /* + days difference */
long days_only; /* days only */
};
void sfdt_get_c_time(char *);
/****************************************************************************
* get time and return in unformated 7 byte string. (hour,minute,second) *
****************************************************************************/
void sfdt_get_c_timeh(char *);
/****************************************************************************
* get time place return in unformated 9 byte string. (hour,minute,seconds, *
* hundreds) *
****************************************************************************/
void sfdt_get_fc_time(char *);
/*****************************************************************************
* get time place result in formated 9 byte string. (hr:mi:se format) *
*****************************************************************************/
void sfdt_get_fc_timeh(char *);
/****************************************************************************
* get time place result in formated 12 byte string. (hh:mi:se:hs format) *
* hour,minute,seconds,hundred seconds *
****************************************************************************/
void sfdt_get_fc_time12(char *);
/****************************************************************************
* get time place result in 12 byte string. 12 hour format with AM PM *
* indicator. *
****************************************************************************/
long sfdt_get_l_time(void);
/****************************************************************************
* returns long integer of current time. *
* format hours:minutes:seconds:hund sec *
* *
* example current time 12:05:05.06 will retunn long integer 12050506 *
****************************************************************************/
long sfdt_comp_diff_l_time(long,long);
/*****************************************************************************
* computes time time difference between long time1, and long time2 *
* returns long time. *
*****************************************************************************/
void sfdt_comp_diff_st_time(struct dostime_t *,struct dostime_t *,struct dostime_t *);
/*****************************************************************************
* compute the time difference of struct tfrom structure time tto and returns *
* value in structure tdif *
*****************************************************************************/
void sfdt_get_c_date(char *,char *);
/****************************************************************************
* get date place in 7 byte unformated string. format command. *
* *
* *
* (date,format) *
* formats are M = month,day,year *
* Y = year,month day *
****************************************************************************/
void sfdt_get_fc_date(char *,char *);
/****************************************************************************
* get formated date and place in 9 byte string. *
* *
* *
* (date,format) *
* formats are M = month,day,year *
* Y = year,month day *
****************************************************************************/
long sfdt_get_l_date();
/****************************************************************************
* get date and return long integer. Format year, month, day *
* example 03/03/87 will return 870303 *
****************************************************************************/
void sfdt_conv_fctoc(char *,char *);
/****************************************************************************
* convert formated character string time/date to unformated string. *
* (9byte,7byte) *
****************************************************************************/
void sfdt_conv_l_time_to_st(long,struct dostime_t *);
/*****************************************************************************
* converts long time (tin) to structure time (tout) *
*****************************************************************************/
long sfdt_conv_st_time_to_l(struct dostime_t *);
/*****************************************************************************
* connvert structure time (tin) returns a long time variable. *
* formate HHmmsshh. HH=hours, mm = minutes, ss=seconds, hh = hundreds *
*****************************************************************************/
void sfdt_conv_l_date_to_st(long,struct dosdate_t *);
/*****************************************************************************
* converts long time (tin) to structure time (tout) *
*****************************************************************************/
long sfdt_conv_st_date_to_l(struct dosdate_t *);
/*****************************************************************************
* converts structure date (din) and returns long date. *
*****************************************************************************/
void sfdt_conv_ctofc(char *,char *,char *);
/*****************************************************************************
* convert unformated to formated charter string with edit character f. *
* *
* (uformated,formated,edit character *
* 7 byte 9 byte 1 byte *
* example sfdt_ctofc("010387",fc,"/") returns fc value "01/03/87" * *
*****************************************************************************/
void sfdt_conv_fc_date_ytom_fc(char *, char *);
/****************************************************************************
* convert formated date in year/month/day format to month/day/year format *
* (mdy,ymd) *
****************************************************************************/
void sfdt_conv_fc_date_mtoy_fc(char *, char *);
/****************************************************************************
* convert formated date in month/day/year format to year/month/day format *
* (mdy,ymd) *
****************************************************************************/
void sfdt_conv_c_date_ytom_c(char *, char *);
/****************************************************************************
* convert unformated string (ymd) to unformated string (mdy) *
****************************************************************************/
void sfdt_conv_c_date_mtoy_c(char *, char *);
/*****************************************************************************
* convert unformated charter (mdy) to unformated (ymd) *
*****************************************************************************/
long sfdt_conv_c_date_to_l(char *,char *);
/****************************************************************************
* convert unformated character date in formate to long integer year,month *
* day. *
****************************************************************************/
long sfdt_conv_fc_date_to_l(char *,char *);
/****************************************************************************
* convert formate character date in format to long integer year month day *
* *
****************************************************************************/
void sfdt_conv_l_date_to_c(long,char *, char *);
/****************************************************************************
* convert long integer date to unformate char date in fomrat *
****************************************************************************/
int sfdt_validate_c_date(char *,char *);
/**************************************************************************
* validate unformated character date, in format y=year month day *
* m=month day year *
**************************************************************************
int sfdt_validate_fc_date(char *,char *);
/****************************************************************************
* validate formated date in formate given *
****************************************************************************/
int sfdt_validate_l_date(long);
/****************************************************************************
* validate long date *
****************************************************************************/
void sfdt_comp_diff_st_date(struct dosdate_t *,struct dosdate_t *,struct dydif *);
/*****************************************************************************
* returns to diffrence of structure date1,date2 in structure diff. *
*****************************************************************************/
void sfdt_comp_diff_l_date(long,long,struct dydif *);
/*****************************************************************************
* computes of diffrence between long date1,date2 return structure diff *
*****************************************************************************/
void sfdt_wait_interval(long);
/*****************************************************************************
* wait and return after time interval formate of input HHmmsshh *
* has expired. where HH = hour mm = minutes *
* ss = seconds hh = hund sec*
*****************************************************************************/
void sfdt_wait_time(long);
/*****************************************************************************
* wait and return after time formate of input HHmmsshh *
* has expired. where HH = hour mm = minutes *
* ss = seconds hh = hund sec*
*****************************************************************************/