-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.1
-
generic
-
solaris_2.5.1
jdk1.1beta3
java.util.Calendar has a method: complete() which the documentation implies
is used to complete the time fields within the Calendar object once some
key instance variables have been set. However, the method is protected,
as are the two methods it calls: computeTime() and computeFields(), so they
can only be called from an object which subclasses Calendar (or one of its
subclasses).
I want to create an instance of a GregorianCalendar without subclassing it,
in which I set the year, month and date, from which I can then retrieve the
day of week etc. There seems to be no way to do this without calling complete()
- which means subclassing the GregorianCalendar.
java.util.Calendar has a method: complete() which the documentation implies
is used to complete the time fields within the Calendar object once some
key instance variables have been set. However, the method is protected,
as are the two methods it calls: computeTime() and computeFields(), so they
can only be called from an object which subclasses Calendar (or one of its
subclasses).
I want to create an instance of a GregorianCalendar without subclassing it,
in which I set the year, month and date, from which I can then retrieve the
day of week etc. There seems to be no way to do this without calling complete()
- which means subclassing the GregorianCalendar.