[]
        
(Showing Draft Content)

GC.Spread.Sheets.GanttSheet.Calendar

Class: Calendar

Sheets.GanttSheet.Calendar

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Calendar(name, defaultWorkWeek?, customWorkWeeks?)

Creates a calendar with the provided work weeks.

classdesc Represents a calender for scheduling, which defines the work times of each day.

Parameters

Name Type Description
name string A string value specifies the name of this calendar.
defaultWorkWeek? WorkWeek Specifies the default work times of each day of week. If not specified, the work times will be same as the standard calendar.
customWorkWeeks? CustomWorkWeek[] Specifies the customized work times of each day of week for the specified date range.

Properties

customWorkWeeks

customWorkWeeks: CustomWorkWeek[]

Gets or sets the custom work weeks for this calendar. Note do not modify a calendar in use. Instead, you could copy a calendar and make changes, then replace the original one.


defaultWorkWeek

defaultWorkWeek: WorkWeek

Gets or sets the default work week for this calendar. Note do not modify a calendar in use. Instead, you could copy a calendar and make changes, then replace the original one.


name

name: string

Gets or sets the calendar name.


hours24

Static hours24: Calendar

The 24 hours calendar, which defines the work time as 24 hours by 7 days in a week.

readonly


nightShift

Static nightShift: Calendar

The night-shift calendar, which defines the work time as 23:00 to 3:00 and 4:00 to 8:00 from Monday evening to Saturday morning.

readonly


standard

Static standard: Calendar

The standard calendar, which defines the work time as 8:00 to 12:00 and 13:00 to 17:00 for Monday to Friday.

readonly

Methods

copyTo

copyTo(newName): Calendar

Copies the work weeks of this calendar to a new calendar.

Parameters

Name Type Description
newName string A string indicates the name of the new calendar.

Returns

Calendar

The copy result.