| @@ 352-357 (lines=6) @@ | ||
| 349 | // Put resulting events in an associative array, with day of the month as key for easy retrieval in calendar days loop. |
|
| 350 | $day_events = array(); |
|
| 351 | foreach ( $filtered as $timestamp => $events_in_day ) { |
|
| 352 | foreach ( $events_in_day as $event ) { |
|
| 353 | if ( $event instanceof Event ){ |
|
| 354 | $day = intval( Carbon::createFromTimestamp( $timestamp, $event->timezone )->endOfDay()->day ); |
|
| 355 | $day_events[ $day ][] = $event; |
|
| 356 | } |
|
| 357 | } |
|
| 358 | } |
|
| 359 | ||
| 360 | ksort( $day_events, SORT_NUMERIC ); |
|
| @@ 330-335 (lines=6) @@ | ||
| 327 | } |
|
| 328 | ||
| 329 | // Put resulting events in an associative array, with Ymd date as key for easy retrieval in calendar days loop. |
|
| 330 | foreach ( $paged_events as $timestamp => $events ) { |
|
| 331 | if ( $timestamp <= $this->end ) { |
|
| 332 | $date = Carbon::createFromTimestamp( $timestamp, $calendar->timezone )->endOfDay()->format( 'Ymd' ); |
|
| 333 | $daily_events[ intval( $date ) ][] = $events; |
|
| 334 | } |
|
| 335 | } |
|
| 336 | ksort( $daily_events, SORT_NUMERIC ); |
|
| 337 | ||
| 338 | if ( ! empty( $paged_events ) ) { |
|