JDK-4219675 : RFE: Calendar is too complicated
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-03-12
  • Updated: 2000-09-28
  • Resolved: 2000-09-28
Related Reports
Duplicate :  
Relates :  
Relates :  
Description

Name: gsC80088			Date: 03/11/99


Calendar is one of the most unintuitive classes
i've ever used.  There's really no need for this complexity.

Unfortunately, instead of simplifying this class,
I've noticed you instead added even more complexity.

I assume the timestamps are there to address the problems
people run into when using this class.  But I'm afraid,
it just makes things worse.  Because there is no way to 
retrieve this time stamp information, there's no way
to predict what results the object will give you.
(however, please don't make the timestamps available!!!)

Please consider making the class more intuitive.
The easiest solution is to elimate the notion of unset
fields and inconsistent state. Make the state *always* 
consistent. In other words, modify or remove all methods
that might make the calendar state inconsistent.  At
any point in time, all calendar fields are available and
completely consistent.

Cheers,
Pat
(Review ID: 52400) 
======================================================================

Comments
EVALUATION It's too late to make drastic changes to the Calendar class. Probably a better approach is to provide another set of classes to deal with date/time/timezone. masayoshi.okutsu@Eng 1999-06-20 Closing this one as a duplicate of 4340168. masayoshi.okutsu@Eng 2000-09-28
20-06-1999