Initializer
GregorianZonedDateTime(Instant instant, TimeZone timeZone = ...)
Parameters:
  • instant

    All operations of this implementations is based in this Instant.

  • timeZone = tz.system

    TimeZone to be applied in this implementation.

Attributes
dateSource Codeshared actual Date date

Returns Date representation of current zoned date and time.

dateTimeSource Codeshared actual DateTime dateTime

Returns DateTime representation of this zoned date and time.

daySource Codeshared actual Integer day

Returns day of month value of this gregorian date.

dayOfEraSource Codeshared actual Integer dayOfEra

Returns day of year value of this gregorian date.

dayOfWeekSource Codeshared actual DayOfWeek dayOfWeek

Returns current day of the week.

dayOfYearSource Codeshared actual Integer dayOfYear

Returns day of year value of this gregorian date.

hoursSource Codeshared actual Integer hours

Number of full hours elapsed since last midnight.

instantSource Codeshared actual Instant instant

All operations of this implementations is based in this Instant.

leapYearSource Codeshared actual Boolean leapYear

Returns true, if this is a leap year according to gregorian calendar leap year rules.

millisecondsSource Codeshared actual Integer milliseconds

Number of milliseconds since last full second.

millisecondsOfDaySource Codeshared actual Integer millisecondsOfDay

Number of milliseconds since last midnight.

minutesSource Codeshared actual Integer minutes

Number of minutes since last full hour.

minutesOfDaySource Codeshared actual Integer minutesOfDay

Number of minutes since last midnight.

monthSource Codeshared actual Month month

Returns month of this gregorian date.

predecessorSource Codeshared actual ZoneDateTime predecessor

For predecessor its used the lowest unit of time, this way we can benefit from maximum precision. In this case the predecessor is the current value minus 1 millisecond.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

Refines Enumerable.predecessor ultimately refines Ordinal.predecessor
secondsSource Codeshared actual Integer seconds

Number of seconds since last minute.

secondsOfDaySource Codeshared actual Integer secondsOfDay

Number of seconds since last midnight.

stringSource Codeshared actual String string

Returns ISO-8601 formatted String representation of this time of day.

Reference: https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC

successorSource Codeshared actual ZoneDateTime successor

For successor its used the lowest unit of time, this way we can benefit from maximum precision. In this case the successor is the current value plus 1 millisecond.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

Refines Enumerable.successor ultimately refines Ordinal.successor
timeSource Codeshared actual Time time

Returns Time representation of current zoned date and time.

timeZoneSource Codeshared actual TimeZone timeZone

TimeZone to be applied in this implementation.

weekOfYearSource Codeshared actual Integer weekOfYear

Returns week of year according to ISO-8601 week number calculation rules.

yearSource Codeshared actual Integer year

Returns year of this gregorian date.

Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: DateTimeBehavior<Element,DateType,TimeType>
Attributes inherited from: Enumerable<Other>
Attributes inherited from: Ordinal<Other>
Attributes inherited from: ReadableDate
Attributes inherited from: ReadableMonth
Attributes inherited from: ReadableTime
Attributes inherited from: ReadableTimeZone
Attributes inherited from: ReadableYear
Attributes inherited from: ZoneDateTime
Methods
compareSource Codeshared actual Comparison compare(ZoneDateTime other)

Comparing ZoneDateTime is based on Instant and should not be compared as it´s human representation as they are adjusted based on geographic and regional (DST) locations and do not represent a comparison correct.

minusDaysSource Codeshared actual ZoneDateTime minusDays(Integer days)

Subtracts number of days from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

minusHoursSource Codeshared actual ZoneDateTime minusHours(Integer hours)

Subtracts number of hours from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

minusMillisecondsSource Codeshared actual ZoneDateTime minusMilliseconds(Integer milliseconds)

Subtracts number of milliseconds from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

minusMinutesSource Codeshared actual ZoneDateTime minusMinutes(Integer minutes)

Subtracts number of minutes from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

minusMonthsSource Codeshared actual ZoneDateTime minusMonths(Integer months)

Subtracts number of months from this zoned date and time and returns the resulting ZoneDateTime.

Note 01: Day of month value of the resulting date will be truncated to the valid range of the target date if necessary.

This means for example, that date(2013, 3, 30).minusMonths(1) will return 2013-02-28, since February 2013 has only 28 days.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

minusSecondsSource Codeshared actual ZoneDateTime minusSeconds(Integer seconds)

Subtracts number of seconds from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

minusWeeksSource Codeshared actual ZoneDateTime minusWeeks(Integer weeks)

Subtracts number of weeks from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

minusYearsSource Codeshared actual ZoneDateTime minusYears(Integer years)

Subtracts number of years from this zoned date and time and returns the resulting ZoneDateTime.

Note 01: Day of month value of the resulting date will be truncated to the valid range of the target date if necessary.

This means for example, that date(2012, 2, 29).minusYears(1) will return 2011-02-28, since February 2011 has only 28 days.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

neighbourSource Codeshared actual ZoneDateTime neighbour(Integer offset)

The indirect successor or predecessor at the given offset, where:

  • x.neighbour(0) == x,
  • x.neighbour(i+1) == x.neighbour(i).successor, and
  • x.neighbour(i-1) == x.neighbour(i).predecessor.
offsetSource Codeshared actual Integer offset(ZoneDateTime other)

Compute the offset from the given value, where:

  • x.offset(x) == 0, and
  • x.successor.offset(x) == 1 if x!=x.successor.
plusDaysSource Codeshared actual ZoneDateTime plusDays(Integer days)

Adds number of days from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

plusHoursSource Codeshared actual ZoneDateTime plusHours(Integer hours)

Adds number of hours from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

plusMillisecondsSource Codeshared actual ZoneDateTime plusMilliseconds(Integer milliseconds)

Adds number of milliseconds from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

plusMinutesSource Codeshared actual ZoneDateTime plusMinutes(Integer minutes)

Adds number of minutes from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

plusMonthsSource Codeshared actual ZoneDateTime plusMonths(Integer months)

Adds number of months to this zoned date and time and returns the resulting date.

Note: Day of month value of the resulting date will be truncated to the valid range of the target date if necessary.

This means for example, that date(2013, 1, 31).plusMonths(1) will return 2013-02-28, since February 2013 has only 28 days.

plusSecondsSource Codeshared actual ZoneDateTime plusSeconds(Integer seconds)

Adds number of seconds from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

plusWeeksSource Codeshared actual ZoneDateTime plusWeeks(Integer weeks)

Adds number of weeks from this zoned date and time and returns the resulting ZoneDateTime.

Note: The resulting ZoneDateTime can be affected by Daylight Saving Time.

plusYearsSource Codeshared actual ZoneDateTime plusYears(Integer years)

Adds number of years to this zoned date and time and returns the resulting ZoneDateTime.

Note 01: Day of month value of the resulting date will be truncated to the valid range of the target date if necessary.

This means for example, that date(2012, 2, 29).plusYears(1) will return 2013-02-28, since February 2013 has only 28 days.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

withDaySource Codeshared actual ZoneDateTime withDay(Integer dayOfMonth)

Returns new ZoneDateTime with the day of month value set to the specified value.

Note 01: It should result in a valid gregorian date.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

withDayOfWeekSource Codeshared actual ZoneDateTime withDayOfWeek(DayOfWeek dayOfWeek)

Returns new ZoneDateTime with the day of week value set to the specified value.

withDayOfYearSource Codeshared actual ZoneDateTime withDayOfYear(Integer dayOfYear)

Returns new ZoneDateTime with the day of year value set to the specified value.

withHoursSource Codeshared actual ZoneDateTime withHours(Integer hours)

Returns new ZoneDateTime with the hour value set to the specified value.

Note 01: It should be a valid hour.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

withMillisecondsSource Codeshared actual ZoneDateTime withMilliseconds(Integer milliseconds)

Returns new ZoneDateTime with the milliseconds value set to the specified value.

Note 01: It should be a valid millisecond.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

withMinutesSource Codeshared actual ZoneDateTime withMinutes(Integer minutes)

Returns new ZoneDateTime with the minute value set to the specified value.

Note 01: It should be a valid minute.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

withMonthSource Codeshared actual ZoneDateTime withMonth(Month month)

Returns new ZoneDateTime with the month value set to the specified value.

Note 01: It should result in a valid gregorian date.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

withSecondsSource Codeshared actual ZoneDateTime withSeconds(Integer seconds)

Returns new ZoneDateTime with the second value set to the specified value.

Note 01: It should be a valid second.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

withWeekOfYearSource Codeshared actual ZoneDateTime withWeekOfYear(Integer weekNumber)

Returns new ZoneDateTime with the week of year value set to the specified value.

withYearSource Codeshared actual ZoneDateTime withYear(Integer year)

Returns new ZoneDateTime with the year value set to the specified value.

Note 01: It should result in a valid gregorian date.

Note 02: The resulting ZoneDateTime can be affected by Daylight Saving Time.

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: TimeBehavior<Element>
Methods inherited from: YearBehavior<Element>
Methods inherited from: ZoneDateTime