Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4237348

Spec/docs inconsistent with impl on Date.parse with 2-digit year

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.1.6_007
    • 1.2.1
    • core-libs
    • 007
    • generic
    • generic


        See java.util.Date.parse()

        Spec does not say how 2-digit years are interpreted. A sliding window is now
        used - year is assumed to be within the range (current - 80 years to now + 19
        years) I think. Looks like this was changed for 1.1.6 (and 1.2) but never
        documented.

        There is a comment at the top of the class which says that a year y is always
        represented in this class by y-1900. This is now misleading.

        Also, there are typos "ATtempts" and "teh" in the first three lines of the
        docs for this method. Just because it is deprecated doesn't mean we should
        be sloppy!


              okutsu Masayoshi Okutsu
              dbowensunw David Bowen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: