-
Enhancement
-
Resolution: Fixed
-
P4
-
1.1.8, 1.2.0, 1.2.1, 1.2.2
-
beta
-
generic, x86
-
generic, windows_nt
Name: sg39081 Date: 06/03/99
Calendar has public methods:
Date getTime();
setTime (Date);
getTime () always returns a new Date made from an internal
millisecond value, and setTime always gets the milliseconds
out of the Date. Date is pretty much a useless class. There
should be public methods:
long getTimeInMillis ();
setTimeInMillis (long);
which avoid the needless/useless Date object. The salt in the
wound on the matter is that there are in fact *protected*
getTimeInMillis() and setTimeInMillis() methods, which seem
to be just fine. They ought to be made public.
Dan Bornstein
###@###.###
(Review ID: 83912)
======================================================================
Name: tb29552 Date: 10/23/99
I need to do Calendar calculations and then send the time from
the epoch in Milliseconds over the network. I can set a
Calendars time with milliseconds by creating a date and setting
the calendar to that date but after doing the calculations I
can't get the milliseconds back out, because the getTimeInMillis()
is protected.
(Review ID: 96942)
======================================================================
- duplicates
-
JDK-4206757 RFE: Date recycling
-
- Closed
-
-
JDK-4171881 API: java.util.{Gregorian,}Calendar are in need of fixed API
-
- Closed
-