-
Enhancement
-
Resolution: Fixed
-
P4
-
1.1.2, 1.1.4, 1.2.0
-
1.2beta4
-
generic, x86, sparc
-
generic, solaris_2.5.1, windows_nt
-
Not verified
An interface for finding the number of days in the current month would be
useful. As it stands, we need an array of month lengths and the isLeapYear
method to determine the length of a month. This introduces a dependency on the
gregorian calendar that we would rather not have in our application code. This
calculation belongs in the calendar (or simple calendar) class.
=================================================================
It would be really nice if it were possible to
do
int d = someCalendar.get(DAYS_IN_MONTH);
in order to find our how many days the current
month has in it.
useful. As it stands, we need an array of month lengths and the isLeapYear
method to determine the length of a month. This introduces a dependency on the
gregorian calendar that we would rather not have in our application code. This
calculation belongs in the calendar (or simple calendar) class.
=================================================================
It would be really nice if it were possible to
do
int d = someCalendar.get(DAYS_IN_MONTH);
in order to find our how many days the current
month has in it.
- duplicates
-
JDK-4107728 API: Number of Days in Month
- Closed
-
JDK-4056989 Calendar needs some helpful APIs
- Closed