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 "YYYYMMDDhhmmss+ZHZM" format 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
  • "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 "stream" valued results this is always the string "???", and for "counter" valued results this is 0 (zero) for differences or 1 (one) for counts.

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

To use this library in a program, you must include the following code near the top of your program:

  ; Date and Time function and constant declarations
  include "omdate.xin"