Calendar Actions

Table of contents

  1. Calendars
    1. Add Calendar
    2. Open Event in Calendar
    3. Edit Event
      1. Event Details
    4. Remove Events
  2. Reminders
    1. Open Reminders List
    2. Remove Reminders
  3. Alarms
    1. Get Alarms
    2. Create Alarm
    3. Turn On Alarm
    4. Turn Off Alarm
    5. Toggle Alarm
    6. Delete Alarm
  4. Clock
    1. Create Timer
      1. Available units:
  5. Dates
    1. Current Date
    2. Specific Date
      1. Example Usage
    3. Get Dates
    4. Add to Date
    5. Subtract from Date
    6. Get Starting Time
    7. Format Date
      1. Date Formats
    8. Format Time
      1. Time Formats
    9. Format Timestamp

Calendars

Add Calendar

Create a calendar with name.

addCalendar(text name)

Open Event in Calendar

showInCalendar(variable event)

Edit Event

Edit a detail of an event. Provide an event, a detail to modify, and a new value for that detail.

editEvent(variable event, enum detail, text newValue)

Event Details

  • Start Date
  • End Date
  • Is All Day
  • Location
  • Duration
  • My Status
  • Attendees
  • URL
  • Title
  • Notes
  • Attachments

Note: Enum values are case-sensitive.


Remove Events

removeEvents(variable events, bool ?includeFutureEvents = false)

Reminders

Open Reminders List

openRemindersList(variable list)

Remove Reminders

removeReminders(variable reminders)

Alarms

Get Alarms

Returns all of the alarms on the device.

getAlarms()

Create Alarm

Create an alarm.

createAlarm(text name, text time, bool ?allowsSnooze = true, array ?repeatWeekdays)

Weekdays for repeatWeekdays are case insensitive.


Turn On Alarm

Turn on an alarm.

turnOnAlarm(variable alarm)

Turn Off Alarm

Turn off an alarm.

turnOffAlarm(variable alarm)

Toggle Alarm

Toggle an alarm on or off depending on current state.

toggleAlarm(variable alarm)

Delete Alarm

Delete an alarm

deleteAlarm(variable alarm)

Clock

Create Timer

Start a timer.

startTimer(number magnitude, enum ?unit = "min")

Available units:

  • hr
  • min
  • sec

Note: Enum values are case-sensitive.

Dates

Current Date

Create a date value with the current date.

currentDate()

Specific Date

Create date value from date.

date(text date)

Example Usage

date("October 5, 2022")

Get Dates

Get dates from value.

getDates(variable input)

Add to Date

Add to a date by units of time.

addSeconds(text date, number magnitude)
addMinutes(text date, number magnitude)
addHours(text date, number magnitude)
addDays(text date, number magnitude)
addWeeks(text date, number magnitude)
addMonths(text date, number magnitude)
addYears(text date, number magnitude)

Subtract from Date

Subtract from the date by units of time.

subtractSeconds(text date, number magnitude)
subtractMinutes(text date, number magnitude)
subtractHours(text date, number magnitude)
subtractDays(text date, number magnitude)
subtractWeeks(text date, number magnitude)
subtractMonths(text date, number magnitude)
subtractYears(text date, number magnitude)

Get Starting Time

Get various starting units of date.

getStartMinute(text date)
getStartHour(text date)
getStartWeek(text date)
getStartMonth(text date)
getStartYear(text date)

Format Date

formatDate(variable date, enum ?dateFormat = "Short")

Date Formats

  • None
  • Short
  • Medium
  • Long
  • Relative
  • RFC 2822
  • ISO 8601
  • Custom

Note: Enum values are case-sensitive.


Format Time

formatTime(variable time, enum ?timeFormat = "Short")

Time Formats

  • None
  • Short
  • Medium
  • Long
  • Relative

Note: Enum values are case-sensitive.


Format Timestamp

formatTimestamp(variable date, enum ?dateFormat = "Short", enum ?timeFormat = "Short")