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

[Fmt-Da] Add another formatting option to SimpleDateFormat for week-based year

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.1
    • core-libs



      Name: jl125535 Date: 01/27/2003


      A DESCRIPTION OF THE PROBLEM :
      Problems with formatting dates in conjunction with
      datawarehouse data retrieval.

      I would suggest another formatting option Y for weeks year.
      This way datawarehouse problems concerning the 53rd week
      would be possible to handle without extending the
      functionability of the current formatting utilities.

      By weeks year i mean for instance 31.12.2003 when formatted
      using yyyyww will be 200301. This will result in two week
      01 in year 2003. If you have an option for weeks year ie
      YYYYww you will get 200401 when formatted.

      Another option I would love to see in the formatting
      classes, is the possibility to use the Calendar class
      instead of the Date class... It seems the Date class is
      locked to the ISO date standard while you can create an
      instance of the GregorianCalendar... In the case above the
      yyyyww formatting string would render to 200353 which is
      the Gregorian way of handling the extra week in a year.

      I reported a bug against simple date format earlier, but
      after reading some I found that the formatting classes
      don't support the Gregorian version of the calendar, or it
      atleast seem that way, so my previous bug report is
      invalid, since the ISO way of formatting week is correct in
      the SimpleDateFormat class.

      (Review ID: 160455)
      ======================================================================

            okutsu Masayoshi Okutsu
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: