Calendar Actions

Table of contents

  1. Alarms
    1. Create Alarm
    2. Delete Alarm
    3. Get Alarms
    4. Toggle Alarm
    5. Turn Off Alarm
    6. Turn On Alarm
  2. Calendars
    1. Add Calendar
    2. Edit Event
    3. Get Event Detail
    4. Open Event in Calendar
    5. Remove Events
  3. Dates
    1. Adjust Date
    2. Current Date
    3. Date
    4. Get Dates
  4. Formatting
    1. Format Date
    2. Format Time
    3. Format Timestamp
  5. Reminders
    1. Open Reminders List
    2. Remove Reminders
  6. Timers
    1. Create Timer

To use actions in this category, use this include statement:

#include 'actions/calendar'

Alarms

Create Alarm

Creates an alarm at specific time with a name, snooze allowance and applicable weekdays.

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

Delete Alarm

Deletes an alarm.

deleteAlarm(variable alarm)

Get Alarms

Returns all of the alarms on the device.

getAlarms()

Toggle Alarm

Toggle an alarm.

toggleAlarm(variable alarm, bool ?showWhenRun = true)

Turn Off Alarm

Turn off an alarm.

turnOffAlarm(variable alarm, bool ?showWhenRun = true)

Turn On Alarm

Turn on an alarm.

turnOnAlarm(variable alarm, bool ?showWhenRun = true)

Calendars

Add Calendar

Create a calendar with name.

addCalendar(text name)

Edit Event

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

enum editEventDetail {
    'Start Date',
    'End Date',
    'Is All Day',
    'Location',
    'Duration',
    'My Status',
    'Attendees',
    'URL',
    'Title',
    'Notes',
    'Attachments',
}

editEvent(variable event, editEventDetail detail, text newValue)

Get Event Detail

Get a detail of an event.

enum eventDetail {
    'Start Date',
    'End Date',
    'Is All Day',
    'Calendar',
    'Location',
    'Has Alarms',
    'Duration',
    'Is Canceled',
    'My Status',
    'Organizer',
    'Organizer Is Me',
    'Attendees',
    'Number of Attendees',
    'URL',
    'Title',
    'Notes',
    'Attachments',
    'File Size',
    'File Extension',
    'Creation Date',
    'File Path',
    'Last Modified Date',
    'Name',
}

getEventDetail(variable event, eventDetail detail)

Open Event in Calendar

Show event in the calendar app.

showInCalendar(variable event)

Remove Events

Remove an event.

removeEvents(variable events, bool ?includeFutureEvents = false)

Dates

Adjust Date

Adjust a date or get the start of a time period.

enum dateOperation {
    'Add',
    'Subtract',
    'Get Start of Minute',
    'Get Start of Hour',
    'Get Start of Day',
    'Get Start of Week',
    'Get Start of Month',
    'Get Start of Year',
}

enum dateUnit {
    'sec',
    'min',
    'hr',
    'days',
    'weeks',
    'months',
    'yr',
}

adjustDate(text date, dateOperation operation, number ?magnitude, dateUnit ?unit)

Current Date

Get the current date.

currentDate()

Date

Create a date value from date. Example: October 5, 2022.

date(text date)

Get Dates

Get dates from input.

getDates(variable input): array

Formatting

Format Date

Format a date using a standard or custom format.

enum dateFormats {
    'None',
    'Short',
    'Medium',
    'Long',
    'Relative',
    'RFC 2822',
    'ISO 8601',
    'Custom',
}

formatDate(variable date, dateFormats ?dateFormat = "Short", text ?customDateFormat)

Format Time

Format a time using a standard or custom format.

enum timeFormats {
    'None',
    'Short',
    'Medium',
    'Long',
    'Relative',
}

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

Format Timestamp

Format a timestamp using standard formats and/or a custom date format.

enum dateFormats {
    'None',
    'Short',
    'Medium',
    'Long',
    'Relative',
    'RFC 2822',
    'ISO 8601',
    'Custom',
}

enum timeFormats {
    'None',
    'Short',
    'Medium',
    'Long',
    'Relative',
}

formatTimestamp(variable date, dateFormats ?dateFormat = "Short", timeFormats ?timeFormat = "Short", text ?customDateFormat)

Reminders

Open Reminders List

openRemindersList(variable list)

Remove Reminders

removeReminders(variable reminders)

Timers

Create Timer

Creates a new timer.

enum timerDuration {
    'hr',
    'min',
    'sec',
}

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

Copyright ©. Distributed under the GPL-2.0 License. Siri Shortcuts and Mac are registered trademarks of Apple Inc. Apple is not involved in this project in any way. Do not contact Apple Support unless you are having an issue with the Shortcuts app itself.