Well, not quite, unless you're using a VERY non-ANSI-Standard version
of Rexx. :-)
Say Date('U',0,'B') --> 01/01/01
But you're right about the "C for Century"; it was always better to
think of it as the Roman numeral for 100. It still suffered from the
same boundary issues as the old Julian date, just not as frequently.
The fact is, Date('C') is not even legal at Rexx Language Level 4.00
(much less ANSI Standard) which has been around for quite a while now.
So the best option is to simply forget about the Date('C') option in
the first place and use Date('B') instead. If you have existing code
that you need to convert, you can establish the Date('C') epoch as a
constant (now 730119) offset to the Date('B') value.
-Chip-
On 1/4/11 22:25 Schuh, Richard said:
It is right with the DATE(B) function - 01/01/1001.
All the technicalities aside, forget about the word "Century" and view
the letter "C" as an abstraction for the described function. Then,
everything is consistent, even if technically incorrect.
*From:* *George Henke/NYLIC*
tyvm, Chip, for the explanation. So this century really began in
Jan 1, 2001, not 2000. Interesting.
*From:* *Chip Davis <c...@aresti.com>*
Technically, the first year of each century is cc01, not cc00.
On 1/3/11 16:03 George Henke/NYLIC said:
> Not quite sure what is the difference between the number of days
since
> the beginning of the century and the number of days since the most
> recent year ending in '00' unless going back or ahead more than a
> century or 2.
>
> But I suppose there is a difference or it would have been moot.
>
> *Chip Davis <c...@aresti.com>*
> Be careful with Date('C'). It doesn't really give you the number of
> days in the current century (as it was originally documented). It
> returns the number of days since the beginning of the most recent
year
> ending in '00', e.g. '2000'.
>
> On 1/3/11 14:25 George Henke/NYLIC said:
> > REXX also has a nifty function called Century Day that
simplifies things
> > by working in century days, days since the beginning of the
century,
> > rather than days since the beginning of the year.