|
|
|
|
| Function | cnvt_julian_date_2_str |
| Include file | J_DATE_R.H |
| Prototype | char * cnvt_julian_date_2_str( int 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( int 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( int 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 | int julian_date( char *date_str ) |
| Remarks | Convert a date str MM/DD/YY[YY] (assumed to have been already validated) into a julian date. If given a 2 digit year str then YY = 50 - 99 will be assumed to mean ( year = 1900 + YY ) else YY = 0 - 49 will be assumed to mean ( year = 2000 + YY ). 3 and 4 digit year strings will be processed as given. The returned julian date value is based with a base date of 01/01/1900 = 0. So 179 years (or 1900 - 2079) will fit into a UWORD. |
![]()
| Function | cnvt_julian_date_2_YYMMDD_flt |
| Include file | J_DATE_R.H |
| Prototype | float cnvt_julian_date_2_YYMMDD_flt( int 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( int 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 | int 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. |
![]()
![]()