getRecDates

returns all occurrences of a recurring event

object getRecDates(string id,number number);
idstringthe id of a recurring event
numbernumberthe maximum number of occurrences to return (by default, 100)
objectan object with 2 properties:
  • start_date - (Date) the start date of a single occurrence
  • end_date - (Date) the end date of a single occurrence

Example

var dates = scheduler.getRecDates(22);

Details

The property requires the recurring extension to be enabled.

For example, there is a recurring event (id: 22) which takes place every 2 days from 14.00 till 15.00, starting from 12th November, 2010; there are 3 occurrences in total. The getRecDates method for this event will return the following array:

[
    { 
      start_date: Tue Oct 12 2010 14:00:00 GMT+0300 (E. Europe Daylight Time),
      end_date: Tue Oct 12 2010 15:00:00 GMT+0300 (E. Europe Daylight Time)
    },
    { 
      start_date: Tue Oct 14 2010 14:00:00 GMT+0300 (E. Europe Daylight Time),
      end_date: Tue Oct 14 2010 15:00:00 GMT+0300 (E. Europe Daylight Time)
    },
    { 
      start_date: Tue Oct 16 2010 14:00:00 GMT+0300 (E. Europe Daylight Time),
      end_date: Tue Oct 16 2010 15:00:00 GMT+0300 (E. Europe Daylight Time)
    }
]
Back to top