i would like to identify the details of an schedule. e.g:
i have the schedule for an event: event.schedule
"Every 3 months on the 10th day of the month"
represented by the hash:
{
:start_date=>2012-02-06 10:37:04 +0100,
:rrules=>[{
:validations=>{
:day_of_month=>[10]},
:rule_type=>"IceCube::MonthlyRule",
:interval=>3
}],
:exrules=>[], :rdates=>[], :exdates=>[]
}
to set the specific form elements (dropdown, checkbox) i need to evaluate the specific rules. e.g. for
event.schedule.interval
i would expect
IceCube::MonthlyRule
i did not found any methods in the source, does somebody did sth. similar ? My approach would be to parse the hash and extract every rule...