PPWIZARD Manual
[Bottom][Contents][Search][Prev]: AutoTag()[Next]: BreakAt()

BaseDate()

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.

INPUT DATE

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:

  1. YYYYMMDD - any following characters ignored.
  2. YY/MM/DD or YYYY/MM/DD
  3. YY-MM-DD or YYYY-MM-DD
  4. YY MM DD or YYYY MM DD
  5. If nothing passed (or blank) then todays date is used.

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.

EXAMPLE INPUT DATES

  1. date('Sorted');
  2. date('Ordered');
  3. "98-2-12"
  4. "1998/02/01"
  5. "20001230"
  6. "20001230235959"


[Top][Contents][Search][Prev]: AutoTag()[Next]: BreakAt()

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Tuesday January 02 2001 at 7:37am