getRecDates

获取重复事件的所有发生时间

object getRecDates(string id,number number);
idstring重复事件的标识符
numbernumber要获取的最大发生次数(默认值为100)
object一个包含两个属性的对象:
  • start_date - (Date) 每次发生的开始时间
  • end_date - (Date) 每次发生的结束时间

Example

var dates = scheduler.getRecDates(22);

Details

此属性需要启用 recurring 扩展。

举例来说,考虑一个重复事件(id: 22),它从2010年11月12日开始,每隔2天发生一次,时间为14:00到15:00,总共发生3次。该事件调用 getRecDates 方法将返回以下数组:

[
    { 
      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)
    }
]
返回顶部