Date and time functions (OMDATE)

The functions in this library define a set of operations on dates and times. They are built around a standard normalized form for the date/time, a 19-character string in the format YYYYMMDDhhmmss+ZHZM, where:

  • YYYY is the four-digit year,
  • MM is the two-digit month number,
  • DD is the two-digit day within the month,
  • hh is the two-digit hour within the day,
  • mm is the two-digit minute within the hour,
  • ss is the two-digit second within the minute,
  • +ZH is the (always) signed two-digit whole number of hours that the given time is ahead of Universal Time, and
  • ZM is the two-digit number of minutes that the given time is ahead of Universal Time in excess of the number of such hours (with the same sign assumed as for +ZH).

The response to erroneous argument values in these functions is to return a conventional value:

  • for values of type string, this is always the string ???, and
  • for values of type integer, this is 0 (zero) for differences or 1 (one) for counts.

OMDATE gets the time from the operating system. It has no a priori knowledge of such things as leap second or daylight savings time, and so is not impacted by them in any way.

Usage Note

To use OMDATE, you must include the following code near the top of your program:

  include "omdate.xin"