Class: IntervalEntry

IntervalEntry()

Entry that repeats on a fixed period measured in days, anchored to an epoch. Built for cycles that do not fit a calendar: orbital periods, comet returns, the saros and metonic cycles. Example: `Halley's Comet Perihelion,every:27758:1986-02-09` The period may be fractional (Mars orbits in 686.98 days); occurrences are rounded to the nearest whole day.

Constructor

new IntervalEntry()

Source:

Classes

IntervalEntry

Methods

getCycleAt(date)

Gets the cycle index nearest to the given date.
Parameters:
Name Type Description
date The date to locate
Source:
Returns:
The (possibly fractional) number of cycles since the epoch

getOccurrence(n)

Gets the nth occurrence relative to the epoch.
Parameters:
Name Type Description
n Cycle index; 0 is the epoch itself, negatives run backwards
Source:
Returns:
The occurrence date