Package com.exedio.cope.util
Class Day
java.lang.Object
com.exedio.cope.util.Day
- All Implemented Interfaces:
Serializable,Comparable<Day>
The class
Day represents a specific day.
An instance of this class does NOT represent range of time,
but rather something like a calendar sheet.
If you want to convert Day into Date or vice versa,
the result depends on the TimeZone.
Instance of this class are immutable, so you cannot change the value of an instance of this class.
- Author:
- Ralf Wiebicke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDay()Deprecated.Day(int year, int month, int day) Day(long date) Deprecated.ProvideTimeZoneas parameter.Deprecated.ProvideTimeZoneas parameter.Day(GregorianCalendar cal) Creates a newDayobject, that represents today.Day(XMLGregorianCalendar cal) -
Method Summary
Modifier and TypeMethodDescriptionadd(int days) Deprecated.UseplusDays(int)insteadbooleanDeprecated.UseisAfter(Day)insteadbooleanDeprecated.UseisBefore(Day)insteadintbooleanstatic DayintgetDay()Deprecated.UsegetDayOfMonth()insteadintDeprecated.ProvideTimeZoneas parameter.getGregorianCalendar(TimeZone zone) intgetMonth()Deprecated.UsegetMonthValue()insteadintDeprecated.ProvideTimeZoneas parameter.getTimeFrom(TimeZone zone) longDeprecated.UsegetTimeInMillisFrom()insteadlongDeprecated.ProvideTimeZoneas parameter.longgetTimeInMillisFrom(TimeZone zone) longDeprecated.ProvideTimeZoneas parameter.longgetTimeInMillisTo(TimeZone zone) Deprecated.ProvideTimeZoneas parameter.getXMLGregorianCalendar(DatatypeFactory factory) intgetYear()inthashCode()booleanbooleanplusDays(int days) static LocalDatetoLocalDate(Day day) toString()static DayDeprecated.ProvideTimeZoneas parameter.static Daystatic DayvalueOf(GregorianCalendar value) static DayvalueOf(XMLGregorianCalendar value)
-
Constructor Details
-
Day
Creates a newDayobject, that represents today. -
Day
-
Day
-
Day
-
Day
-
Day
public Day(int year, int month, int day) -
Day
Deprecated.ProvideTimeZoneas parameter.Creates a newDayobject, that represents today. -
Day
Deprecated.ProvideTimeZoneas parameter. -
Day
Deprecated.ProvideTimeZoneas parameter.
-
-
Method Details
-
valueOf
-
valueOf
-
valueOf
-
getYear
public int getYear() -
getMonthValue
public int getMonthValue()- See Also:
-
getDayOfMonth
public int getDayOfMonth()- See Also:
-
getTimeFrom
-
getTimeTo
-
getTimeInMillisFrom
-
getTimeInMillisTo
-
getGregorianCalendar
-
getXMLGregorianCalendar
-
getXMLGregorianCalendar
-
plusDays
- See Also:
-
equals
-
isAfter
-
isBefore
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<Day>
-
toLocalDate
- See Also:
-
toLocalDate
-
from
- See Also:
-
toString
-
getMonth
Deprecated.UsegetMonthValue()instead -
getDay
Deprecated.UsegetDayOfMonth()instead -
add
Deprecated.UseplusDays(int)instead -
after
Deprecated.UseisAfter(Day)instead -
before
Deprecated.UseisBefore(Day)instead -
valueOf
Deprecated.ProvideTimeZoneas parameter. -
getTimeFrom
Deprecated.ProvideTimeZoneas parameter. -
getTimeTo
Deprecated.ProvideTimeZoneas parameter. -
getTimeInMillisFrom
Deprecated.ProvideTimeZoneas parameter. -
getTimeInMillisTo
Deprecated.ProvideTimeZoneas parameter. -
getGregorianCalendar
Deprecated.ProvideTimeZoneas parameter. -
getTimeInMillis
Deprecated.UsegetTimeInMillisFrom()instead
-
TimeZoneas parameter.