Patch: GregorianCalendar returns bad values from getMinimum().
Sven de Marothy
Sun Feb 6 18:13:00 GMT 2005
Yes, I included David's fix in my most recent patch. But in the context
of how much was and is broken with GregorianCalendar, it's a minor bug.
I don't see why you're discussing this. You should merge in the
Classpath versions of these classes ASAP and perhaps close some of those
related Bugzilla bugs.
> > There are a few changes in Classpath that are not reflected in libgcj,
> > however I wouldn't call it a rewrite. Someone has gone and rather
> > gratuitously reformatted a bunch of code and created a lot of diffs, but
> > there's only a few significant code changes.
Well, my only comment is that I feel the changes were significant. The
old code was broken in nearly every way. There were also what appear to
be ad-hoc 'fixes' introduced into the code, which didn't really fix
Leniency basically did not work correctly at all. Pre-gregorian-cutover
(1582) dates were all wrong. The cutover itself was not handled
correctly. The BC-AD transition was wrong. The day of week was incorrect
for all dates prior to the epoch (1970). Handling of time-zones was
correct in some places and incorrect in others. Handling of insufficient
data was incorrect. Nonlenient checking wasn't working in all cases.
Clearing the calendar resulted in the wrong values. The priority order
of fields was wrong. Etc. The code had No, it's not a complete rewrite,
but in hindsight that would've been easier, giving the time I spent
trying to figure out how the broken code was supposed to work before
realizing it couldn't work.
I also removed several commented-out methods, redundant methods, and
some confusingly similar methods (getLinearDay()/getLinearTime()).
The remaining bugs I know of is that minimumDaysInFirstWeek and
firstDayOfWeek handling isn't implemented. I'm working on that. There
may be bugs in the roll methods too, I haven't tested them yet.
More information about the Java-patches