Package slash.common.type
Class CompactCalendar
java.lang.Object
slash.common.type.CompactCalendar
A compact representation of a calendar, that saves some memory.
A
Calendar needs about 250 bytes, this guy needs only 20.- Author:
- Christian Pesch
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanafter(CompactCalendar other) asUTCTimeInTimeZone(TimeZone timeZone) booleanbefore(CompactCalendar other) static DateFormatcreateDateFormat(String pattern) static DateFormatcreateDateFormat(String pattern, Locale locale) booleanstatic CompactCalendarfromCalendar(Calendar calendar) static CompactCalendarstatic CompactCalendarfromMillis(long timeInMillis) static CompactCalendarfromMillisAndTimeZone(long timeInMillis, String timeZoneId) getTime()longbooleaninthashCode()static CompactCalendarnow()static CompactCalendarstatic CompactCalendarbooleansameDay(CompactCalendar other) toString()
-
Field Details
-
UTC
-
-
Method Details
-
createDateFormat
-
createDateFormat
-
parseDate
-
parseDate
public static CompactCalendar parseDate(String dateString, String dateFormatString, boolean logError) -
fromMillisAndTimeZone
-
fromMillis
-
fromCalendar
-
fromDate
-
now
-
asUTCTimeInTimeZone
-
getTimeInMillis
public long getTimeInMillis() -
getTimeZoneId
-
getCalendar
-
hasDateDefined
public boolean hasDateDefined() -
getTime
-
after
-
before
-
sameDay
-
equals
-
hashCode
public int hashCode() -
toString
-