bb.util
Class DateUtil.DateInfo
java.lang.Object
bb.util.DateUtil.DateInfo
- Enclosing class:
- DateUtil
private static final class DateUtil.DateInfo
- extends Object
Stores various calendar related qualities of a Date, such as its era, year, etc.
(Currently only stores information down to the day level
because the search algorithm inside getDateInfo
is day based.)
This class is multithread safe: it has no mutable state.
Method Summary |
private boolean |
isFor(long time)
Returns true if this instance is suitable for time, false otherwise. |
String |
toString()
|
era
private final int era
year
private final int year
yearStart
private final Date yearStart
month
private final int month
monthStart
private final Date monthStart
weekOfMonth
private final int weekOfMonth
weekOfYear
private final int weekOfYear
weekStart
private final Date weekStart
dayOfYear
private final int dayOfYear
dayOfMonth
private final int dayOfMonth
dayOfWeek
private final int dayOfWeek
dayStart
private final long dayStart
dayLength
private final long dayLength
isLeapDay
private final boolean isLeapDay
timeZoneChange
private final DateUtil.TimeZoneChange timeZoneChange
leapSecond
private final int leapSecond
- -1 if is a negative leap second day (has never happened as of 2005/3/22), 0 if no leap second, +1 if is a positive leap second day (a normal leap second).
DateUtil.DateInfo
private DateUtil.DateInfo(Date date)
toString
public String toString()
- Overrides:
toString
in class Object
isFor
private boolean isFor(long time)
- Returns true if this instance is suitable for time, false otherwise.
Here, time is the usual absolute time measurement used by Java (i.e. the number of milliseconds since the epoch),
and the suitability criteria is whether or not time falls inside the day defined by this instance.