JDK-4808661 : [Fmt-Da] Add another formatting option to SimpleDateFormat for week-based year
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2003-01-27
  • Updated: 2010-08-27
  • Resolved: 2010-08-27
Related Reports
Duplicate :  
Relates :  
Description

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) 
======================================================================

Comments
EVALUATION This CR includes two separate requests. The week-year support will be addressed in 4267450. The other part is a duplicate of 6205686. Closing this one as a duplicate.
27-08-2010