OS/2 Procedures Language 2/REXX


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


DATE




 >>---DATE(--+---------+-)------><
             +-option--+

DATE returns, by default, the local date in the format: dd mon yyyy (for 
example, 27 Aug 1988), with no leading zero or blank on the day. For mon, 
the first three characters of the English name of the month will be used. 
The following options (of which only the capitalized letter is needed, all 
others are ignored) can be used to obtain alternative formats: 
 Basedate        Returns the number of complete days (that is, not 
                 including the current day) since and including the base 
                 date, January 1, 0001, in the format: dddddd (no leading 
                 zeros). The expression   DATE(B)//7   returns a number in 
                 the range 0-6, where 0 is Monday and 6 is Sunday. 
                 Note:    The origin of January 1, 0001 is based on the 
                          Gregorian calendar. Though this calendar did not 
                          exist prior to 1582, Basedate is calculated as 
                          if it did: 365 days per year, an extra day every 
                          four years except century years, and leap 
                          centuries if the century is divisible by 400. It 
                          does not take into account any errors in the 
                          calendar system that created the Gregorian 
                          calendar originally. 
                 
 Days            Returns the number of days, including the current day, so 
                 far in this year in the format: ddd (no leading zeros) 
 European        Returns date in the format: dd/mm/yy. 
 Language        Returns date in an implementation and language dependent 
                 or local date format. In the OS/2 operating system, the 
                 Language format is dd Month yyyy. If no local format is 
                 available, the default format is returned. 
                 Note:    This format is intended to be used as a whole; 
                          REXX programs should not make any assumptions 
                          about the form or content of the returned 
                          string. 
 Month           Returns full English name of the current month, for 
                 example, August 
 Normal          Returns date in the default format: dd mon yyyy 
 Ordered         Returns date in the format: yy/mm/dd (suitable for 
                 sorting, and so on.) 
 Sorted          Returns date in the format: yyyymmdd (suitable for 
                 sorting, and so on.) 
 Usa             Returns date in the format: mm/dd/yy 
 Weekday         Returns the English name for the day of the week, in 
                 mixed case. For example, Tuesday. 
 
 Here are some examples: 

 DATE( )        ->    '27 Aug 1988'  /*  perhaps  */
 DATE('B')      ->    725975
 DATE('D')      ->    240
 DATE('E')      ->    '27/08/88'
 DATE('L')      ->    '27 August 1988'
 DATE('M')      ->    'August'
 DATE('N')      ->    '27 Aug 1988'
 DATE('O')      ->    '88/08/27'
 DATE('S')      ->    '19880827'
 DATE('U')      ->    '08/27/88'
 DATE('W')      ->    'Saturday'
 
 
 
 Note:    The first call to DATE or TIME in one expression causes a time 
          stamp to be made which is then used for all calls to these 
          functions in that expression. Therefore, if multiple calls to 
          any of the DATE and/or TIME functions are made in a single 
          expression, they are guaranteed to be consistent with each 
          other. 
   

Inf-HTML End Run - Successful