@@ 299-307 (lines=9) @@ | ||
296 | if ( strtotime( $recurring_event_date_start ) < $current ) { |
|
297 | if ( $interval > 1 ) { |
|
298 | $recurring_event_date_start = date( 'Ymd', strtotime( $event_date_desc . date( 'F Y', strtotime( '+ ' . ( $interval * $catchup ) . ' months', strtotime( $event['DTSTART'] ) ) ) ) ) . date( '\THis', strtotime( $event['DTSTART'] ) ); |
|
299 | } else { |
|
300 | try { |
|
301 | $adjustment = new DateTime( date( 'Y-m-d', $current ) ); |
|
302 | $adjustment->modify( 'first day of next month' ); |
|
303 | $recurring_event_date_start = date( 'Ymd', strtotime( $event_date_desc . $adjustment->format( 'F Y' ) ) ) . date( '\THis', strtotime( $event['DTSTART'] ) ); |
|
304 | } catch ( Exception $e ) { |
|
305 | // Invalid argument to DateTime |
|
306 | } |
|
307 | } |
|
308 | } |
|
309 | } |
|
310 | break; |
|
@@ 320-328 (lines=9) @@ | ||
317 | $recurring_event_date_start = date( "Ymd\THis", strtotime( $event['DTSTART'] ) ); |
|
318 | } else { |
|
319 | $recurring_event_date_start = date( 'Y', $current ) . date( "md\THis", strtotime( $event['DTSTART'] ) ); |
|
320 | if ( strtotime( $recurring_event_date_start ) < $current ) { |
|
321 | try { |
|
322 | $next = new DateTime( date( 'Y-m-d', $current ) ); |
|
323 | $next->modify( 'first day of next year' ); |
|
324 | $recurring_event_date_start = $next->format( 'Y' ) . date ( 'md\THis', strtotime( $event['DTSTART'] ) ); |
|
325 | } catch ( Exception $e ) { |
|
326 | // Invalid argument to DateTime |
|
327 | } |
|
328 | } |
|
329 | } |
|
330 | break; |
|
331 |