[TRINIDAD] Conversion of two digit years

View: New views
2 Messages — Rating Filter:   Alert me  

[TRINIDAD] Conversion of two digit years

by Carsten Pieper :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, a little question: According to the Trinidad documentation (e.g. here) the year offset for parsing two
digit year entries is 1950. However, when I look into the 1.0.10 sources things look diferently.
E.g. in function _fix2DYear(int) in DateFormat.js you'll find:
    // if the new year is now more than 80 years in the past,
    // then it is actually a date in the future, so add the 100 years
    // back in.  The 80 years rule, matches Java's spec
    if (year + 80 < currentYear)
    {
      year += 100;
    }
By the way, the 80 years rule is what I actually observe in our applications.
Does this mean, the documentation is out-out-date?

Any insights welcome! Thanks, Carsten

Re: [TRINIDAD] Conversion of two digit years

by Carsten Pieper :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oops, of course it should be "out-of-date"
Carsten Pieper wrote:
Does this mean, the documentation is out-out-date?