Skip to main content

Interface: WorkingCalendar

Defined in: scheduling/working-calendar.ts:27

An immutable set of workdays and holidays. A new calendar is a new object. Every answer reads the day in the Dataset zone, so a 23-hour or 25-hour day still counts as one day.

Methods​

addWorkdays()​

addWorkdays(instant, count, time): Instant

Defined in: scheduling/working-calendar.ts:32

instant moved by count workdays, at the same wall-clock time. A negative count moves back. From a non-workday, 1 lands on the next workday and -1 on the previous one.

Parameters​

instant​

InstantInput

count​

number

time​

ZonedTime

Returns​

Instant


isWorkday()​

isWorkday(day, time): boolean

Defined in: scheduling/working-calendar.ts:29

Is the day that holds day a workday?

Parameters​

day​

InstantInput

time​

ZonedTime

Returns​

boolean


offTime()​

offTime(): OffTimeCover

Defined in: scheduling/working-calendar.ts:36

The days off, as a cover for timeShading().

Returns​

OffTimeCover


workdaysBetween()​

workdaysBetween(a, b, time): number

Defined in: scheduling/working-calendar.ts:34

Workdays in the half-open day range from the day of a up to the day of b. It is negative when b is earlier.

Parameters​

a​

InstantInput

b​

InstantInput

time​

ZonedTime

Returns​

number