1 03/07/85  Time Strings
  2 
  3 This segment describes the format of time strings accepted by the
  4 convert_date_to_binary_ subroutine.  Dates in the range 0001-01-01
  5 through 9999-12-31 (GMT) are handled.
  6 
  7 
  8 Normal dates:
  9 
 10 EXAMPLE             FORMAT
 11 December 15, 1979   month_name dd, year
 12 December 15 1979      (comma optional)
 13 December 15           (year optional)
 14 15 April 1844       dd month_name year
 15 15 Avril              (year optional)
 16 04/01/1582          mm/dd/year
 17 12/15/1979          mm/dd/year
 18 12/15/79            mm/dd/yy (century optional)
 19 12/15                 (yy optional)
 20 
 21 
 22 Calendar dates:
 23 1979-12-15          year-mm-dd
 24 1776-07-04
 25 79-12-15            yy-mm-dd
 26 
 27 
 28 24-hour times:
 29 1545.715            hhmm.m
 30 1545.                 (fraction optional but . required)
 31 745.                hmm.m
 32 15:45:42.0856       hh:mm:ss.s
 33 15:45:42              (fraction optional)
 34 15:45                 (seconds optional)
 35 7:45                h:mm
 36 7:2                 h:m
 37 
 38 
 39 12-hour times: 24-hour times with colon, but followed by meridiem
 40 designator which may be: am (or a), pm (or p), noon (or n), midnight
 41 (or m).  Hour number may not exceed 12.
 42 11:07:30.5 pm       hh:mm:ss.s meridiem
 43 5:45 am             h:mm meridiem
 44 5A                  h meridiem
 45 12 n                12 half-day-meridiem
 46 midnight            half-day-meridiem
 47 
 48 
 49 Day of week: can be the name of a day of the week.  If the date is
 50 given, the date must fall on the named day of week.  If the date is not
 51 given, then day of the week acts as an offset.
 52 
 53 
 54 Offsets: amount of time added to other clock values.  It is expressed
 55 as an optionally signed fixed point number, followed by a time unit.
 56 One or more of following offset units may be given:
 57 
 58    SINGULAR            PLURAL       ABBREVIATION
 59   microsecond       microseconds        usec
 60   second            seconds             sec
 61   minute            minutes             min
 62   hour              hours               hr
 63   day               days                da
 64   week              weeks               wk
 65   month             months              mo
 66   year              years               yr
 67 
 68 
 69 Offsets are applied in the following order--
 70   day-of-week (as an offset)
 71   year
 72   month
 73   week, day, hour, minute, second, microsecond
 74 
 75 
 76 Time zone: Here are a few of the zones available.  For a complete list,
 77 type "display_time_info -zones".
 78   GMT, Greenwich Mean Time
 79   EST, Eastern Standard Time
 80   EDT, Eastern Daylight Time
 81 Instead of a zone name, a zone designator may be used, i.e. "10A-0700".
 82 A zone designator consists of a sign, 2 digits of hour and 2 digits of
 83 minute.  It must always follow a time specification.
 84 
 85 
 86 Adverbial offsets: Adverbial clauses which precede a traditional time
 87 string.  They can have the format:
 88 
 89    <dayname> on or after  <trad_time_string>
 90    <dayname> on or before <trad_time_string>
 91    <dayname> after or on  <trad_time_string>
 92    <dayname> before or on <trad_time_string>
 93    <signed_offsets> before <trad_time_string>
 94    <signed_offsets> after <trad_time_string>
 95 
 96 
 97 Keywords: now can be used instead of a time, to indicate the current
 98 time of day, in the working zone.  today can be used instead of a date
 99 to indicate today's date.  Yesterday and tomorrow can also be used, to
100 indicate 1 day before today and 1 day after today.
101 
102 
103 "this xxx": The xxx are units used to form a date or time.  The "this
104 xxx" form is used in place of a part of a date or time value, to
105 indicate that the current value should be used at that point.
106 
107 
108 Miscellany:
109   841013124523.982222         request id, both date and time
110   FW198412                    fiscal week
111   now
112   today
113   tomorrow
114   yesterday
115 
116 
117 Notes: Alphabetic fields may be uppercase or lowercase, and may be
118 abbreviated.  The allowable abbreviations are as defined in time_info_
119 for the various languages it supports.  Some languages may not have
120 any defined short form.  Spaces are not required between alphabetic
121 and numeric fields, but are required between two numeric fields unless
122 the second number begins with a plus (+) or minus(-) sign.
123 Underscores may be used in place of spaces to facilitate typing of
124 time strings in command lines.
125 
126 Day, month, and zone names are shown here in English, but they may be
127 given in any language which is defined in the system time_info_ table.
128 In a given string, all names must be in the same language.
129 
130 
131 Command examples:
132 day_name -1 day
133    (prints day name of yesterday)
134 
135 time 2.5dia -20minuto
136    (prints the time 20 minutes ago 2-1/2 days from now)
137 
138 time -5 hours
139    (prints the time 5 hours ago)
140 
141 date 10/1 -1 day +1 month
142    (assuming today is 9/25/79, prints 10/31/79)
143 
144 
145 date [month]/1/[year]+1month-1day
146    (prints date of last day of this month)
147 
148 list -from [month]/1/[year]_midnight
149    (lists files modified since first of this month, at midnight)
150 
151 
152 Time string examples:
153   Tue after Mon on or after Nov 1
154           (election day)
155   5 hours 27 minutes after now
156   today 13:00
157   1 day before today
158           (yesterday)
159   this month 1, this year
160           (the first day of this month)
161   this_month/1/this_year
162           (the first day of this month)
163   this_hour:30
164           (the half hour point of the current hour)