Skip to content

EntryRecurrence

Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.

interface EntryRecurrence {
frequency: Z.Calendar.Frequency,
occurences?: number,
end?: Date,
interval?: number,
weekDays?: Z.Calendar.WeekDay[],
monthDays?: number[],
months?: Z.Calendar.Month[],
yearWeeks?: number[],
yearDays?: number[]
}

A set of options surrounding the recurrence of an event.

##Variables

VariableTypeDescription
frequencyZ.Calendar.FrequencyThe frequency at which an event should occur.
occurrencesnumberHow many times the event should occur. Optional if an end has been stated.
endJavaScript Date objectThe last date that the event can occur. Optional if occurrences has been stated.
intervaloptional, numberThe number of each time frame (defined by frequency) between events. E.g. frequency of weekly with an interval of 2 is a fortnightly event.
weekDaysoptional, array of Z.Calendar.WeekDayThe days of the week on which the event can occur.
monthsoptional, array of Z.Calendar.MonthThe months in which the event can occur.
yearDaysoptional, array of numbersThe days (in the year) that the event can occur.
yearWeeksoptional, array of numbersThe weeks (in the year) that the event can occur.
Z.calendar.add({
title: "Cassini Launch Anniversary",
start: new Date(1997, 9, 15, 4, 43), // 4:43am October 15th 1997
end: new Date(1997, 9, 15, 5, 43), // an hour later
recurrence: {
frequency: Z.Calendar.Frequency.yearly,
end: new Date(2017, 8, 15) // when to end the recurring event
}
});