True. But is there a benefit to using Date over Calendar? As far as I can tell Date is just a wrapper for a long now, right? Why not use Calendar instead?
| Tom Schindl <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 10/10/2006 10:09 AM
|
|
Christopher J Gross schrieb:
[...]
>> > Both use on the deprecated Date class. Calendar is the replacement.
>> > Would like to see the primary getters/setters use Calendar and perhaps
>> > extra methods for Date. Should also avoid GregorianCalendar as that
>> > doesn't exist on CLDC.
>> I am not really convinced that Calendar must be used in priority in
>> getters/setters. Even if many methods are deprecated, Date class is
>> always widely used in applications when there is no computations to do.
>> I think that none of Date and Calendar are fully satisfying, and both
>> are complementary : Date for display and format, Calendar for
> computations.
>> There is no problem to have setters for both types. But it is not so
>> simple for getters.
> Sure many application use Date, but it seems strange to make the primary
> getters/setters use a deprecated class. Why not just have
> getSelection/setSelection use Calendar and another pair,
> getDate/setDate, use Date?
>
Well the Date-class itself is not deprecated only most of its methods.
Date is used as a datastorage.
Tom
_______________________________________________
nebula-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________ nebula-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/nebula-dev
