}else if ( preg_match( ';BYday=(.*);', $rule, $matches ) ) {
- echo '<pre>$matches: ' . print_r($matches, true) . '</pre>';
+ echo '<pre>1354 $matches: ' . print_r($matches, true) . '</pre>';
// check if the selection is the nth week with a selected day, if not parse the input as a list if selected days
if(strpos($matches[1], ",") == false){
$serialized_custom_times = serialize($stamp);
}
}
+ if ($recurring_event && $from_date == $to_date ) {
+ // Add two years to the recurring event if dates match
+ $starting_datetime = new DateTime( $from_date );
+ $ending_date = $starting_datetime->modify('2 years');
+ $to_date = $ending_date->format( 'Y-m-d' );
+ }
$all_day = $event_data['allday'];
// for the recurrences part
$recur_data = array(