Menu

Recurring Event

When you create an event in calendar, you can make it repeat over a period of time like once a week or every other Tuesday. Repeating events saves you the time and effort it would take to create multiple separate events and let’s you easily change all events in the series at once.

Web2Cal supports recurring scheduling patterns such as daily, weekly, monthly, yearly or set a range of recurrence from a date to date.

An event indicates the repeating pattern by specifying the "repeatObject" attribute. The attributes of the event object and repeatObject are described below with samples. 

 

var event = {
          repeatEvent: {
                  mode: "day|week|month|year" // represents the repeat mode. 
                  endDate:  Date or "MM/DD/YYYY", 
                  repeatCount: number
                  day: {onlyWeekDays: true|false} // further info for repeat type "day"
                  week: {days: ["0,1,2,3,4,5,6"]} // further info for repeat type "week"
                  month: {
                       weekNumber: "1|2|3|4|-1" // -1 represents last week of month
                     , weekDay: "0|1|2|3|4|5|6" // -1 represents last day of month
                     , repeatDate: Date or "YYYY-MM-DD HH:MM:SS" 
                  } // further info for repeat type "month"
                  year: {date: Date or "YYYY-MM-DD HH:MM:SS" } 
          }
          eventType: "null|EXCLUDE" 
          relEventId: number 
          sequence: number 
          deleted: true|false
}

Examples

Repeats every day

var event = {
          startTime: "2013-06-24 11:00:00", endTime:"2013-06-24 13:00:00", eventId: "100"
          name: "repeats every day",
          repeatEvent: {
             mode:"day" 
             day:{}
          }
}

Repeats every 2nd Friday

var event = {
          startTime: "2013-06-24 11:00:00", endTime:"2013-06-24 13:00:00", eventId: "100"
          name: "repeats every 2nd Friday",
          repeatEvent: {
             mode:"month" 
             month:{weekNumber: 2, weekDay: 5}
          }
}

Repeats every month on 20th

var event = {
          startTime: "2013-06-24 11:00:00", endTime:"2013-06-24 13:00:00", eventId: "100"
          name: "repeats every month on 20th",
          repeatEvent: {
             mode:"month" 
             month:{repeatDate: "2013-06-20 "}
          }
}

Repeats every week on Mondays, Tuesdays

var event = {
          startTime: "2013-06-24 11:00:00", endTime:"2013-06-24 13:00:00", eventId: "100"
          name: "repeats every week on Mondays, Tuesdays",
          repeatEvent: {
             mode:"week" 
             week:{days:"1,2"}
          }
}

Repeats every other Monday

var event = {
          startTime: "2013-06-24 11:00:00", endTime:"2013-06-24 13:00:00", eventId: "100"
          name: "repeats every other Monday",
          repeatEvent: {
             mode:"week" 
             week:{days:"1"}
          }
          repeatCount: 2
}

ABOUT US