Workweek

The Workweek class represents the information about what the work schedule for project management calculations. The constructors are not accessible from scripts.

Fields

Field

Type

Description

calendarId

integer

Read only. An internal value assigned to each calendar, unique in each document. The standard calendar is always has a value of 1.

workdays

integer

The days of the week that are work days, as a bit field (see Workday Type below).

events

Read only. The exceptions to the work schedule.

Methods

init( workdays )

Creates a new Workweek with the given workdays with no work schedule exceptions.

init( workweek )

Creates a new Workweek which is a deep copy of given Workweek instance.

checkWorkDay( day )

Returns True if the given day is a regular work day for this Workweek, where day is one of the Workday values below.

checkWorkDay( date )

Returns True if the given date (a Date instance) would be a work day for this Workweek with exceptions considered.

addExceptionForDate( date )

Adds an exception to the work schedule for given date.

removeExceptionForDate( date )

Removes an exception to the work schedule for given date.

Constants

Workday Type

MONDAY_MASK
TUESDAY_MASK
WEDNESDAY_MASK
THURSDAY_MASK
FRIDAY_MASK
SATURDAY_MASK
SUNDAY_MASK
DEFAULT_WORKDAYS

Bit values for days of the week. DEFAULT_WORKDAYS is the same as the masks for Monday through Friday, OR'd together.

Last updated