An interface for date objects in the ISO-8601 calendar system.

A date is often viewed as triple of year-month-day values. This interface also defines access to other date fields such as day-of-year, day-of-week and week-of-year.

no type hierarchy

Attributes
hashSource Codeshared actual default Integer hash

Implementation compatible with equals() method.

This implementation respect the constraint that if x==y then x.hash==y.hash.

Refines Object.hash
Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Enumerable<Other>
Attributes inherited from: Ordinal<Other>
Attributes inherited from: ReadableDate
Attributes inherited from: ReadableMonth
Attributes inherited from: ReadableYear
Methods
atSource Codeshared formal DateTime at(Time time)

Returns new DateTime value based on this date and a specified time.

equalsSource Codeshared actual default Boolean equals(Object other)

Checks if this date is equal to another date.

Compares this Date with another ensuring that the date both objects refer to is the same.

minusSource Codeshared formal Date minus(ReadableDatePeriod period)

Subtracts a specified period to this date.

periodFromSource Codeshared formal Period periodFrom(Date start)

Returns the period between this and the given date.

If this date is before the given date then return zero period.

periodToSource Codeshared formal Period periodTo(Date end)

Returns the period between this and the given date.

If this date is after the given date then return zero period.

plusSource Codeshared formal Date plus(ReadableDatePeriod period)

Adds a specified period to this date.

rangeToSource Codeshared formal DateRange rangeTo(Date other)

Returns the DateRange between this and given Date.

Inherited Methods
Methods inherited from: Object
Methods inherited from: Comparable<Other>
Methods inherited from: DateBehavior<Element>
Methods inherited from: Enumerable<Other>
Methods inherited from: MonthBehavior<Element>
Methods inherited from: YearBehavior<Element>