|Component:||Date Repeat API|
When entering a repeating date, it would make sense if the start date is only saved if it matches the repeat rule.
For example, if I add the first date as a Monday and then choose "repeat weekly on Friday", I would like the repetitions to start with the following Friday.
Looking at the code I found out why:
// The start date always goes into the results, whether or not it meets
// the rules. RFC 2445 includes examples where the start date DOES NOT
// meet the rules, but the expected results always include the start date.
$days = array(date_format($start_date, DATE_FORMAT_DATETIME));
I took a quick look at how Google Calendar does it, and it updates the start date to match the first valid date. We probably don't want this in every case, but it would be very practical. Conversely, it'd be great if the repeating pattern would automatically match the selected start date (ie. when the start date is a Thursday, and I select "repeat weekly", Thursday is automatically selected).