:SET_CALE

Use the :SET_CALE script statement to add or remove a date or time period to or from a static Calendar Event in a Calendar object.

Notes

Tip: Write a script to check whether a date is valid in a particular Calendar object and Calendar Event. For more information, see VALID_CALE.

Syntax

:SET_CALE Calendar, Calendar Event, [Date Format:]Date1[,[Date Format:]Date2[,Action]]

Parameters

Examples

The first example adds a date to a calendar called ON-CALL and a Calendar Event called SMITH.

:SET_CALE "ON-CALL", "SMITH", "YY-MM-DD:20-12-24"

The second example removes the current day from the static Calendar Event called BROWN.

:SET &TODAY# = SYS_DATE()
:
SET_CALE "ON-CALL", "BROWN", &TODAY#,, OFF

The third example determines the beginning and end of the current week, and then adds this time period to the SMITH Calendar Event.

:SET &TODAY# = SYS_DATE()
:
SET &BEGINNING# = FIRST_OF_PERIOD (&TODAY#, "WW")
:
SET &END# = LAST_OF_PERIOD (&TODAY#, "WW")
:
SET_CALE "ON-CALL", "SMITH", &BEGINNING#, &END#

See also:

seealso

Script Date and Time Functions

Date, Time and Period Formats in Scripts

Calendars (CALE)