Recurring events on a calendar : RFC 5545 Javascript parsing- Stack Overflow

I need to integrate recurring events into an adapted version of full-calendar that has an added javascr

I need to integrate recurring events into an adapted version of full-calendar that has an added javascript module which allows offline event browsing.

I'm looking for a javascript library that can parse recurring events according to RFC 5545.

I need to be able to list all recurring events that occur between 2 dates (start date and end date), using RRULE and EXDATE and interpreting daily, weekly, monthly and yearly recurrences.

I've spent hours searching for something to no aval, and I don't want to reinvent the wheel....Can anyone please point me in the right direction for an existing javascript parser?

I need to integrate recurring events into an adapted version of full-calendar that has an added javascript module which allows offline event browsing.

I'm looking for a javascript library that can parse recurring events according to RFC 5545.

I need to be able to list all recurring events that occur between 2 dates (start date and end date), using RRULE and EXDATE and interpreting daily, weekly, monthly and yearly recurrences.

I've spent hours searching for something to no aval, and I don't want to reinvent the wheel....Can anyone please point me in the right direction for an existing javascript parser?

Share Improve this question edited Nov 14, 2011 at 14:17 wouter asked Nov 12, 2011 at 10:32 wouterwouter 311 silver badge4 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 4

I checked into skyporters rrule_parser and found that it doesn't support all of the rules (particularly, it won't do BYDAY properly). I found a fantastic alternative:

https://github./jakubroztocil/rrule

They are actively supporting this library and have a great demo website that shows all of the functionality. You can parse from either 5545 format or plain text (using the nlp extension). It is feature packed and, as far as I can tell, fully functioning.

look into https://github./skyporter/rrule_parser.

I hope it will help you.

here is a recurrence widget for jquery, which parses/creates RFC5545 patible recurrence strings.

https://github./collective/jquery.recurrenceinput.js

it does not expanding of a recurrence rule into occurrence dates, though. but it includes a python server, which can do it for you, using python-dateutil: http://labix/python-dateutil

I needed this functionality myself, along with time zone support, so I made a typescript/javascript library: rSchedule.

Currently supports all ICAL recurrence rules except BYSETPOS, BYWEEKNO, and BYYEARDAY. Supports serialization to/from ICAL format along with a ton of extra stuff.

Example:

const rule = new RRule({
  frequency: 'YEARLY',
  byMonthOfYear: [2, 6],
  byDayOfWeek: ['SU', ['MO', 3]],
  start: new Date(2010,1,7),
}, {
  dateAdapter: StandardDateAdapter
})

let index = 0;
for (const date of rule.occurrences()) {
  date.toISOString()
  index++

  if (index > 10) break;
}

rule.occurrences({
  start: new Date(2010,5,7),
  take: 5
})
  .toArray()
  .map(date => date.toISOString())

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744346573a4569721.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信