Constructor LIMITATION: if dst equals RegularLocalTime, and unit is Second, Minute or Hour, then the amount must be a factor of 24. So 120 seconds is allowed while 121 seconds is not. This is due to the enormous processing power required by these cases. They are not implemented and you will get an assert.
The reference date of the period. If the period is in Months or Years, and the day is 29 or 30 or 31, the results are maximised to end-of-month.
The interval of the period
Optional
dst: PeriodDstSpecifies how to handle Daylight Saving Time. Not relevant if the time zone of the reference datetime does not have DST. Defaults to RegularLocalTime.
timezonecomplete.Argument.Dst for invalid dst value
timezonecomplete.Argument.Interval if amount not positive integer
timezonecomplete.Argument.Interval.NotImplemented if dst=RegularLocalTime and the interval is not a multiple of one day
Constructor LIMITATION: if dst equals RegularLocalTime, and unit is Second, Minute or Hour, then the amount must be a factor of 24. So 120 seconds is allowed while 121 seconds is not. This is due to the enormous processing power required by these cases. They are not implemented and you will get an assert.
The reference of the period. If the period is in Months or Years, and the day is 29 or 30 or 31, the results are maximised to end-of-month.
The amount of units.
The unit.
Optional
dst: PeriodDstSpecifies how to handle Daylight Saving Time. Not relevant if the time zone of the reference datetime does not have DST. Defaults to RegularLocalTime.
timezonecomplete.Argument.Amount for invalid amount
timezonecomplete.Argument.Unit for invalid time unit
timezonecomplete.Argument.Interval if amount not positive integer
timezonecomplete.Argument.Interval.NotImplemented if dst=RegularLocalTime and the interval is not a multiple of one day
timezonecomplete.Argument.Dst for invalid dst value
Constructor LIMITATION: if dst equals RegularLocalTime, and unit is Second, Minute or Hour, then the amount must be a factor of 24. So 120 seconds is allowed while 121 seconds is not. This is due to the enormous processing power required by these cases. They are not implemented and you will get an assert.
period represented as JSON object
timezonecomplete.Argument.Json for invalid JSON (missing reference, unparseable reference or interval)
timezonecomplete.Argument.Interval if amount not positive integer
timezonecomplete.Argument.Interval.NotImplemented if dst=RegularLocalTime and the interval is not a multiple of one day
Allow not using instanceof
Returns true iff this period has the same effect as the given one. i.e. a period of 24 hours is equal to one of 1 day if they have the same UTC reference moment and same dst.
timezonecomplete.UnawareToAwareConversion if not both other#reference()
and the reference date are both aware or unaware
of time zone
timezonecomplete.NotFound.Zone if the UTC time zone doesn't exist in the time zone database
The first occurrence of the period greater than the given date. The given date need not be at a period boundary. Pre: the fromdate and reference date must either both have timezones or not
the first date matching the period after fromDate, given in the same zone as the fromDate.
timezonecomplete.UnawareToAwareConversion if not both fromdate and the reference date are both aware or unaware of time zone
timezonecomplete.NotFound.Zone if the UTC time zone doesn't exist in the time zone database
The last occurrence of the period less than the given date. The given date need not be at a period boundary. Pre: the fromdate and the period reference date must either both have timezones or not
the last date matching the period before fromDate, given in the same zone as the fromDate.
timezonecomplete.UnawareToAwareConversion if not both from
and the reference date are both aware or unaware of time zone
timezonecomplete.NotFound.Zone if the UTC time zone doesn't exist in the time zone database
Returns the next timestamp in the period. The given timestamp must be at a period boundary, otherwise the answer is incorrect. This function has MUCH better performance than findFirst. Returns the datetime "count" times away from the given datetime.
Boundary date. Must have a time zone (any time zone) iff the period reference date has one.
Number of periods to add. Optional. Must be an integer number, may be positive or negative, default 1
(prev + count * period), in the same timezone as prev.
timezonecomplete.Argument.Prev if prev is undefined
timezonecomplete.Argument.Count if count is not an integer number
Returns the previous timestamp in the period. The given timestamp must be at a period boundary, otherwise the answer is incorrect.
Number of periods to subtract. Optional. Must be an integer number, may be negative.
(next - count * period), in the same timezone as next.
timezonecomplete.Argument.Next if prev is undefined
timezonecomplete.Argument.Count if count is not an integer number
Returns true iff this period was constructed with identical arguments to the other one.
nothing
Checks whether the given date is on a period boundary (expensive!)
timezonecomplete.UnawareToAwareConversion if not both occurrence
and the reference date are both aware or unaware of time zone
timezonecomplete.NotFound.Zone if the UTC time zone doesn't exist in the time zone database
Returns a JSON-compatible representation of this period
nothing
Repeating time period: consists of a reference date and a time length. This class accounts for leap seconds and leap days.