thauber / django-schedule

A calendaring app for Django. It is now stable, Please feel free to use it now. Active development has been taken over by bartekgorny.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better rrule parameter support

wnielson opened this issue · comments

Currently it is not possible to create more complicated Rules like in the dateutil example. Consider the following case:

A Rule that occurs every other month on the 1st and last Sunday of the month for 10 occurrences.

You would create the rrule object like so:

rrule(MONTHLY, interval=2, count=10, byweekday=(SU(1), SU(-1)), dtstart=parse("19970907T090000"))

This requires a Rule with the following params value:

"byweekday:SU(1), SU(-1);interval:2"

I've created a patch that makes the get_params function more powerful.

The modified rule.py is here: http://gist.github.com/358536

being tested on https://github.com/bartekgorny/django-schedule.

It begs for some documentation and/or admin interface...