Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RRule support #17

Closed
volpino opened this issue Jul 8, 2013 · 13 comments
Closed

RRule support #17

volpino opened this issue Jul 8, 2013 · 13 comments

Comments

@volpino
Copy link

volpino commented Jul 8, 2013

It would be useful to get RRules as input and output for supporting more complex recurring schedules.

@bunkat
Copy link
Owner

bunkat commented Jul 8, 2013

I took a look at RRules and I don't see any schedules there that aren't already supported using Laterjs (and there are a lot of schedules that can be defined in Laterjs that aren't supported in RRule such as composites and exceptions).

What types of schedules were you trying to define? Or do you just prefer the RRule interface?

@volpino
Copy link
Author

volpino commented Jul 9, 2013

Sorry, I misunderstood some things. I was thinking to use later.js for a personal project but I thought it could also export cron expressions, not only take them as input. As cron expressions cannot represent some rules that can be represented in RRule i thought it could be a good idea to have them as input and output.

Anyway as the library cannot export scheduling rules this issue can be ignored, probably it is not what you want from your library. But if you think that a serialization format is needed i think that RRule is good enough (even though you should find some tricks to represent exceptions and composites).

@bunkat
Copy link
Owner

bunkat commented Jul 9, 2013

Ah, I see. That's something that I might look into in the future, right now I just use a simple JSON object to store schedule definitions which seems to work pretty well for my needs.

@bunkat bunkat closed this as completed Jul 9, 2013
@jgornick
Copy link

@bunkat I agree that rrule doesn't provide any extra scheduling features, however, in my scenario my schedules are all in rrule and the ability to pass an rrule string into later.js would help greatly.

It might be worth it to check out the work on rrule.js (https://github.com/jakubroztocil/rrule). It seems that both of your projects are attempting to reach the same goal, but later.js does have more features. Referencing rrule.js might show a very minimal effort path to implementing in later.js.

The owner of the project (@jakubroztocil) is also cool and might be willing to collaborate.

@bunkat
Copy link
Owner

bunkat commented May 19, 2014

The conversion from rrule to Later would be pretty straightforward if anybody is interested in creating it. I think each time period in rrule has a direct conversion to a Later constraint so it is just a matter of going through each rrule and converting it to the appropriate JSON. However, since I have no need for it and it seems only a couple of people would really use it, I don't have any plans on implementing it myself.

@jgornick
Copy link

@bunkat Thanks for the response. If I can find some free time, I will look into it. Cheers.

@bunkat
Copy link
Owner

bunkat commented May 19, 2014

Let me know if you do, I'd be happy to answer any questions about how Later works or how to go about doing the conversion.

@mattdeluco
Copy link

Actually, with the implementation of iCal recurrence rules (RFC 2445, superseded by RFC 5545) this library would be very useful to a lot of people, I think.

I'm personally interested in later not for running tasks but for generating recurring dates for an event management platform. Being able to store iCal recurrence rules will be convenient when it comes to exporting calendars.

Later is the best javascript solution I've found for recurring dates. Between later and schedule I'm surprised there hasn't been greater demand for iCal rules.

@mattdeluco
Copy link

I've started work on parsing iCal RRULEs here: https://github.com/mattdeluco/later/tree/ical

As part of supporting rrules, I created another branch for supporting negative counts for day of week (SU, MO, TU, etc), day of month (1, 2, 3...31), week of year (1-53), and day of year (1-365). Negative counts (issue 57) are part of the iCal spec referenced in my earlier post. I've really struggled with the period modifier, it seems quite complicated and I wonder if it might make more sense to just make new constraints. It certainly doesn't seem possible to create a modifier that will cover all four cases I've listed here.

I also asked about limiting schedules by count or date (issue 59), to which there seems to be a reasonable solution.

My branches include some unit testing too, so be sure to check that out. More tests are necessary.

I need to get back to work on my primary project for a while, but I thought I'd see if I could recruit some help in this thread.

I really think RFC 5545 support in the later library would be a really big deal.

@luixal
Copy link

luixal commented Apr 11, 2016

Just found this issue and, to avoid reinventing the wheel, has been any advance in this topic?

IMHO, I think it would be great to have both things: init a laterjs object from an iCal expression (there are some UI libs that generate recurring events in that format that could then be used with laterjs, that's my main problem right now), and been able to export a laterjs object in iCal format.

Thanks!

@gduquesnay
Copy link

Same issue here. Trying to find an existing UI for creating these rules or a way to create rrules and then subsequently easily convert them to later.js. Can anyone point me to UI examples?

@luixal
Copy link

luixal commented Jan 10, 2017

@gduquesnay what I finally did was searching for UIs for building cron expresions (there are a few. Yes, not really pretty) and build the later object using its output (cron expression as a String commonly).

Anyway, it would be great to have a nice common UI with variants/styles (bootstrap, materialize, foundation, pure css...) and many outputs (laterjs, rrule, cron...), but Santa didn't read my letter or I've been a not so good boy this year :(

@gduquesnay
Copy link

@luixal That's a good idea. Thanks. Trying with this one now http://shawnchin.github.io/jquery-cron/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants