J_DATE_R module routines

Company Information Software Products TDF Market Reports Download Area take me Home

J_DATE_R.C - Julian_DATE_Routines

Some ANSI C Julian date routines.

Function cnvt_julian_date_2_str
Include file J_DATE_R.H
Prototype char *cnvt_julian_date_2_str( UINT julian , int str_type )
Remarks Convert a julian date into either a MM/DD/YY or YYMMDD style date str depending on str_type. This routine is front-ended by 2 routines - cnvt_julian_date_2_YYMMDD( jd ) and cnvt_julian_date_2_MM_DD_YY( jd ) which will worry about setting the string type. The returned str is built in a module static char array. Each new call will overwrite the array. If the year is between 1900 & 1999 then 1900 will be subtracted.

Function cnvt_julian_date_2_YYMMDD
Include file J_DATE_R.H
Prototype char *cnvt_julian_date_2_YYMMDD( UINT julian_date )
Remarks Request YYMMDD date str style from cnvt_julian_date_2_str().

Function cnvt_julian_date_2_MM_DD_YY
Include file J_DATE_R.H
Prototype char *cnvt_julian_date_2_MM_DD_YY( UINT julian_date )
Remarks Request DD/MM/YY date str style from cnvt_julian_date_2_str().

Function julian_date
Include file J_DATE_R.H
Prototype UINT julian_date( char *date_str )
Remarks Convert a date str MM/DD/YY (assumed to have been already validated) into a julian date.

Function cnvt_julian_date_2_YYMMDD_flt
Include file J_DATE_R.H
Prototype float cnvt_julian_date_2_YYMMDD_flt( UINT julian_date )
Remarks Convert a julian into a float.

Function day_of_the_week
Include file J_DATE_R.H
Prototype int day_of_the_week( UINT julian_num ) /* Sun=0 , Mon=1 ... Sat=6 */
Remarks Convert a julian date into a day of the week offset.

Function get_jdate_from_user
Include file J_DATE_R.H
Prototype UINT get_jdate_from_user( char *prompt_str )
Remarks Will prompt the user with the prompt_str, fetch his input, validate it, if valid then return the julian date else Invalid date msg to the user and loop till he gets it right.

Table of Contents Function Index

generated on 08 February 1998 - 14:42:35
© 1998 Tierra del Fuego Ltd.