Alarms are alerts which can be attached to Reminder and Event objects.

// create reminder with alarm
let list = ReminderList.findOrCreate("Errands")
let reminder = list.createReminder()
reminder.title = "Get more paper towels"

let alarm = Alarm.alarmWithDate((3).days().fromNow())
reminder.addAlarm(alarm)
reminder.update()

Constructors

Properties

absoluteDate?: Date

The date the alarm is schedule for, if it is a date-based alarm.

relativeOffset: Number

The relative offset in seconds for alarms scheduled relative to the event time.

Methods

  • Alarm set to remind at a specific date/time.

    Parameters

    • date: Date

      Specific date time to assign trigger the alarm.

    Returns Alarm

  • Alarm set to remind at a specific number of seconds relative to the start date of the event. Note that alarms created with this methods are only supported on Event objects, not [[Reminder objects.

    Parameters

    • seconds: Number

      Number seconds from now

    Returns Alarm

""