![]() | ![]() | ![]() | ![]() | ![]() |
This is a rexx function provided by PPWIZARD. This routine (like all PPWIZARD extensions) can be used with any operating system supported by PPWIZARD.
This function can be called to work out a basedate (julian day) given a date. The integer will be negative if an error occurred. You can tell how many days apart 2 dates are by subtraction of one from the other. The basedate is the number of days since 1 January 0001.
If the returned basedate integer is divided by 7, the remainder will tell you what day of the week it is (where 0=Monday, 6=Sunday).
The number returned for a date is compatible with rexx's "date('BaseDate')" call.
The routine takes a single parameter (the date) with the year, month and day of month being supplied in that order. The year should either be supplied as 4 digits or will pivot at 1980.
It will take the input in these formats:
Note that it actually does not matter how many digits are supplied for day of month and month, however a resonable amount of validation occurs.
![]() | ![]() | ![]() | ![]() | ![]() |