SuperScript::Software::cdt

The caldaytime program


Interface

  caldaytime opts data
where opts is a series of getopt-style options and data is a set of date values.

If it encounters a permanent error, caldaytime exits 100. If it encounters a temporary error, caldaytime exits 111. Otherwise it exits 0.

Dates are in either ISO format (YYYY-MM-DDThh:mm:ssXhhmm) or basic format (YYYYMMDDhhmmss). A date may carry a leading sign character. The ISO format requires at least one year digit but otherwise permits arbitrary numbers of digits per component. Whitespace may appear in place of the literal T, and before the sign X, which is either + or -. The timezone offset hhmm must consist of four characters, two for hours and two for minutes. The basic format requires two digits for month, day, hour, minute, and second, but permits zero or more year digits. The basic format does not support a timezone offset.

By default, caldaytime works with dates in ISO format.

Options

General Options:

Algorithm

For each input date, caldaytime performs the following steps:
  1. Normalize to a calendar date.

  2. Set the datetime components per y, m, d, h, u, s, and z options.

  3. Apply the offset accumulated from o options.

  4. Normalize to a calendar date.

  5. Calculate the range of dates to print.

  6. Apply the offset accumulated from O options.

  7. For each date in range, print the normalized date iff it is in the list of weekdays specified by w options (all days by default).

Date range determinations with options W, M, Y, D, and L options are mutually exclusive. If the i option appears, then caldaytime steps through the range in increments given by the argument to i. Otherwise the increment is one day. The default range is one day.