ploticus: dates

## dates | Welcome Gallery Handbook |
| Manual page for dates(PL)

## DESCRIPTION

Data containing dates may be plotted directly and/or used in date arithmetic (using functions).`` The allowable formats for dates are enumerated herein (see KEY below for explanation of codes).

Month, day, and year notations:

- `mmddyy` (example: 033199)
- `mm-dd-yy` (example: 03-31-99)
- `mm-dd-yyyy` (example: 03-31-1999)
- `mm/dd/yy` (example: 03/31/99)
- `dd-mm-yy` (example: 31-03-99)
- `dd/mm/yyyy` (example: 31/03/99)
- `ddmmmyyyy` (example: 31mar1999 or 31MAR99)
- `dd-mmm-yy` (example: 31-mar-99 or 31-MAR-99)
- Others:

      mm/dd/yyyy  mmddyyyy      mm.dd.yy    mm.dd.yyyy
      mmm-dd-yy   mmm-dd-yyyy   mmm_dd_yy   mmm_dd_yyyy
      mmm/dd/yy   mmm/dd/yyyy

      dd-mm-yy    dd-mm-yyyy    dd/mm/yy    dd/mm/yyyy
      ddmmyy      dd.mm.yy      dd.mm.yyyy
      dd-mmm-yyyy dd_mmm_yy     dd_mmm_yyyy
      dd/mmm/yy   dd/mmm/yyyy   ddmmmyy     ddmmmyyyy

      yy-mm-dd    yy/mm/dd      yymmdd      yy.mm.dd
      yyyy-mm-dd  yyyy/mm/dd    yyyymmdd    yyyy.mm.dd
      yyyy-mmm-dd yyyy_mmm_dd   yyyymmmdd

  ``

Month & year notations
(a day value of 01 is used internally for arithmetic/plotting purposes):

- `yymm` (example: 9903)
- `mm/yyyy` (example: 03/1999)
- Others: `yy/mm yy-mm yyyymm yyyy/mm yyyy-mm mm/yy mm-yy mm-yyyy`

Quarter year notations
(day and month will be set to mid-quarter for arithmetic/plotting purposes):

- `yyqn` (example: 99q1 or 99Q1)
- `nqyyyy` (example: 1q1999 or 1Q1999)
- Others: `yyyyqn nqyy`

Year only notation

- `yy` (uses pivot year, so 00 is greater than 99)

## DEFAULT NOTATION

The default notation is mmddyy, unless otherwise specified in the ploticus configuration file .``

## PLOTTING VARIOUS DATE NOTATIONS

To plot data having date notations other than the default, use the format portion of the `xscaletype` or `yscaletype` attributes of proc areadef or proc defineunits.``
For example:

    #proc areadef
      xscaletype: date mm/dd/yy

Alternate full-date notations: When using notations that do not contain a specific day (such as month year, quarter year, or year only) there may be occasions when it is necessary to specify an exact day point (for example to create an annotation).`` To do this, an alternate full date format may be used.`` For example, if `yyqn` notation is being used, full dates may be given in `yy/mm/dd` format. For an example this, see bars9

  ``

      			Alternate full-
      Notation 		date notation
      -------------------	-----------
      yymm			yymmdd
      yymmm			ddmmmyy
      yy/mm, yy-mm, etc.	yy/mm/dd
      yyyy/mm, yyyy-mm, etc.	yyyy/mm/dd
      yy			yymmdd
      mm/yy, mm-yy, etc.	dd/mm/yy
      mm/yyyy, mm-yyyy, etc.	dd/mm/yyyy
      yyqn			yy/mm/dd
      yyyyqn			yyyy/mm/dd
      nqyy			yy/mm/dd
      nqyyyy			yyyy/mm/dd

## DISPLAY FORMATS

In addition to the above notations, the following additional notations may be used only for displaying dates (such as with the stubformat attribute, for instance). They may not be used for date plotting or arithmetic.``

Full dates for presentation:

- `month_dd,_yyyy` (or `full`) (example: March 31, 1999)
- `mon_dd,_yyyy` (example: Mar 31, 1999)
- `dd_month,_yyyy` (example: 31 March, 1999)
- `dd_mon,_yyyy` (example: 31 Mar, 1999)
- `Www_dd_mon,_yyyy` (or `wfull`) (example: Wed 31 Mar, 1999)

Month & year only: `mmyy, mmyyyy`

Month & day only: `mmmdd, mmm/dd, mmm-dd, mmm_dd, mm/dd, mm-dd, mm_dd`

Year only: `'yy, yyyy`

Month only: `mmm, mm, m`

Day only: `dd d`

Weekday:

- `W` (example: S M T W T F S)
- `Www` (example: Sun Mon Tue Wed Thu Fri Sat)

## KEY TO CODE ABBREVIATIONS

`m` = single character month (use M for capitalized)
`mm` = numeric month 01-12
`mmm` = three-character month e.g. jan (use MMM for JAN or Mmm for Jan)
`mon` = month abbreviation e.g. Jan
`month` = full month e.g. January
`dd` = numeric day 01-31
`d` = numeric day 1-31
`yy` = numeric year 00-99
`yyyy` = numeric year 1800-up
`w` = single character weekday (use W for capitalized)
`www` = three character weekday (use Www or WWW for capitalized)
`n` = 1, 2, 3 or 4 (quarter year notations)
`q` = the letter `q` or `Q` (quarter year notations)
`_` (underscore) = space

## BASIC UNIT

The basic date unit is always a day, regardless of which notation is in use. Stub and tic increments may be expressed in `months` or `years`, if desired.``

## DATE ARITHMETIC AND FORMATING NOTES

1. It is possible to omit weekends. This is usually done in business- or market-related plots. To omit weekends, set the `omitweekends` attribute in proc datesettings

2. Conversion from two-digit dates to four digit dates is achieved using a pivot year- any two digit year less than this value is assumed to be 21st century. The pivot year (default = 77) is adjustable in the ploticus configuation file or in proc datesettings

3. When three-character months are used, they are always entered and stored as lower case; however the capitalization of the "mmm" can be altered to control the way dates are presented, e.g. Mmm = Jan, MMM = JAN.``

4. "Lazy" dates may be used.`` A lazy date has 00 as the day and/or month portion and is usually used in situations where the day and/or month is unknown or unavailable.`` When a lazy date is used in date arithmetic the missing month and/or day is converted to 01.`` By default, lazy dates are not permitted for date arithmetic.`` They can be allowed by setting an attribute in proc datesettings

5. Localization of date presentation parameters may be done in the ploticus configuration file .``

6. There are a number of functions for manipulating dates that may be used in ploticus scripts.``

## Y2K COMPLIANCE

Ploticus has been tested on a year=2000 machine and found to be year 2000 compliant.``
data display engine
Copyright Steve Grubb

Markup created by unroff 1.0, `` `` June 18, 2001.