SuperScript::Software::cdt

The calday program


Interface

  calday 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, calday exits 100. If it encounters a temporary error, calday exits 111. Otherwise it exits 0.

Dates are in either ISO format (YYYY-MM-DD) or basic format (YYYYMMDD). 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. The basic format requires two digits for month and day, but permits zero or more year digits.

By default, calday works with dates in ISO format.

Options

General Options:

Algorithm

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

  2. Set the date components per y, m, and d.

  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 calday steps through the range in increments given by the argument to i. Otherwise the increment is one day. The default range is one day.