[JSR310 M7 Review request] 8007392: JSR310 DateTime API Updates
forax at univ-mlv.fr
Fri Feb 8 13:56:44 UTC 2013
On 02/08/2013 12:12 PM, Stephen Colebourne wrote:
> On 8 February 2013 00:23, Remi Forax <forax at univ-mlv.fr> wrote:
>> I wonder if it's not better to declare enum constants of DayOfWeek (and
>> Month) in an order that is not the usual week/month order to make clear that
>> ordinal() doesn't work as expected.
>> By example they can be declared in alphabetical order.
> The constants need to be in order as Enums are Comparable.
> (It was actually a mistake that all enums are Comparable, but not one
> that can be fixed now)
don't get it,
English calendar starts with Sunday, French one with Monday,
so the result of Sunday.compareTo(Monday) is dubious,
that why I think that the only valid order is the lexical one.
More information about the core-libs-dev