An abstract moment in time (like 4pm, October 21. 2012).

DateTime does not contain a time zone information, so You can not use it to record or schedule events.

no type hierarchy

Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: DateTimeBehavior<Element,DateType,TimeType>
Attributes inherited from: Ordinal<Other>
Attributes inherited from: ReadableDate
Attributes inherited from: ReadableTime
Methods
instantSource Codeshared formal Instant instant(TimeZone timeZone = ...)

Returns an instant from this DateTime.

Parameters:
  • timeZone = tz.system
minusSource Codeshared formal DateTime minus(ReadablePeriod period)

Subtracts a specified period to this date and time.

periodFromSource Codeshared formal Period periodFrom(DateTime start)

Returns the period between this and the given DateTime.

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

periodToSource Codeshared formal Period periodTo(DateTime end)

Returns the period between this and the given DateTime.

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

plusSource Codeshared formal DateTime plus(ReadablePeriod period)

Adds a specified period to this date and time.

rangeToSource Codeshared formal DateTimeRange rangeTo(DateTime other)

Returns the DateTimeRange between this and given DateTime.

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