Skip to content

Commit

Permalink
No need for this.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauteri committed Jan 28, 2024
1 parent 6ff8671 commit 21183a3
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions includes/core/classes/class-event.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ class Event {
*/
protected array $datetimes = array();

/**
* Storing and retrieving various formats for event datetimes.
*
* @since 1.0.0
* @var array
*/
protected array $formatted_datetimes = array();

/**
* RSVP instance.
*
Expand Down Expand Up @@ -424,12 +416,6 @@ protected function get_formatted_datetime(
string $which = 'start',
bool $local = true
): string {
$key = $format . ' ' . $which . ' ' . $local;

if ( isset( $this->formatted_datetimes[ $key ] ) ) {
return $this->formatted_datetimes[ $key ];
}

$dt = $this->get_datetime();
$date = $dt[ sprintf( 'datetime_%s_gmt', $which ) ];
$dt['timezone'] = static::maybe_convert_offset( $dt['timezone'] );
Expand All @@ -450,8 +436,6 @@ protected function get_formatted_datetime(
$date = wp_date( $format, $ts, $tz );
}

$this->formatted_datetimes[ $key ] = $date;

return (string) $date;
}

Expand Down

0 comments on commit 21183a3

Please sign in to comment.