C_DATE_R.C - Convert and validate DATE Routines.
Date formats supported are MM/DD/YY, European DD/MM/YY, and YYMMDD strings,
YYMMDD floats and UINT julians. There are conversion routines to do any
translation. The julian conversion routines are in the julian module
J_DATE_R.C.
Function
|
validate_date_field
|
Include file
|
C_DATE_R.H
|
Prototype
|
int validate_date_field( char *date_field )
|
Remarks
|
Front-end to validate_MM_DD_YY. This routine supports lazy user input,
given MM/DD the routine will add the current year. The year is saved and
carried over from call to call so you could enter 11/12/91 then 11/13 and
have 91 added on. The modified str is then checked by validate_MM_DD_YY.
|
Function
|
validate_MM_DD_YY
|
Include file
|
C_DATE_R.H
|
Prototype
|
int validate_MM_DD_YY( char *date_str )
|
Remarks
|
Validate the month and day fields of a MM/DD/YY date str. Return TRUE if
valid else FALSE (all INVALID - 2/29/83 | 14/02/91 | 10/44/99 ).
|
Function
|
cnvt_MM_DD_YY_2_flt
|
Include file
|
C_DATE_R.H
|
Prototype
|
float cnvt_MM_DD_YY_2_flt( char *date_str )
|
Remarks
|
Convert a MM/DD/YY date string into a float of YYMMDD.
|
Function
|
cnvt_DD_MM_YY_2_flt
|
Include file
|
C_DATE_R.H
|
Prototype
|
float cnvt_DD_MM_YY_2_flt( char *date_str )
|
Remarks
|
Convert a European style DD/MM/YY date string into a float of YYMMDD.
|
Function
|
get_date_substr
|
Include file
|
C_DATE_R.H
|
Prototype
|
static char *get_date_substr( char *src , char *dest )
|
Remarks
|
Simple worker parse routine for cnvt_MM_DD_YY_2_flt.
|
Function
|
cnvt_YYMMDD_flt_2_MM_DD_YY
|
Include file
|
C_DATE_R.H
|
Prototype
|
char *cnvt_YYMMDD_flt_2_MM_DD_YY( float flt_date )
|
Remarks
|
Convert a YYMMDD float into a MM/DD/YY date string.
|
Function
|
cnvt_YYMMDD_flt_2_DD_MM_YY
|
Include file
|
C_DATE_R.H
|
Prototype
|
char *cnvt_YYMMDD_flt_2_DD_MM_YY( float flt_date )
|
Remarks
|
Convert a YYMMDD float into a Euro style DD/MM/YY date string.
|
Function
|
cnvt_YYMMDD_str_2_flt
|
Include file
|
C_DATE_R.H
|
Prototype
|
float cnvt_YYMMDD_str_2_flt( char *date_str )
|
Remarks
|
Convert a YYMMDD date str into a YYMMDD float.
|
Function
|
cnvt_YYMMDD_str_2_MM_DD_YY
|
Include file
|
C_DATE_R.H
|
Prototype
|
char *cnvt_YYMMDD_str_2_MM_DD_YY( char *date_str )
|
Remarks
|
Convert a YYMMDD date str into a MM/DD/YY date str
|
Function
|
cnvt_MM_DD_YY_2_YYMMDD_str
|
Include file
|
C_DATE_R.H
|
Prototype
|
char *cnvt_MM_DD_YY_2_YYMMDD_str( char *date_str )
|
Remarks
|
Convert a MM/DD/YY date str into a YYMMDD date str
|
Function
|
cnvt_YYMMDD_flt_2_YYMMDD_str
|
Include file
|
C_DATE_R.H
|
Prototype
|
char *cnvt_YYMMDD_flt_2_YYMMDD_str( float flt_date )
|
Remarks
|
Convert a YYMMDD float date into a YYMMDD date str
|
Function
|
constant_length_date
|
Include file
|
C_DATE_R.H
|
Prototype
|
char *constant_length_date( char *date_str )
|
Remarks
|
Well not quite any more - expand day and month fields to 2 digits and
return the year field un-touched.
|
Function
|
get_field_from_YYMMDD_flt
|
Include file
|
C_DATE_R.H
|
Prototype
|
int get_field_from_YYMMDD_flt( float flt_date , int which_field )
|
Remarks
|
Fetch a field from a YYMMDD float style date and return it as an int. This
routine is front-ended by 3 macros to fetch each individual field. The
macros just need a date as a argument. They are defined in C_DATE_R.H and
are get_YY_from_YYMMDD_flt( fd ), get_MM_from_YYMMDD_flt( fd ) and
get_DD_from_YYMMDD_flt( fd )..
|
Table of Contents
Function Index
generated on 08 February 1998 - 14:42:29
© 1998 Tierra del Fuego Ltd.
|