From c2354e7397f44998691dfe8241e49c5a65f66dcc Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 28 Jan 2023 17:38:32 +0100 Subject: Use DateTimeImmutable for concert date/time. --- includes/view-helpers/class-giglogadmin-concertform.php | 2 +- includes/view-helpers/class-giglogadmin-concertstable.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/view-helpers') diff --git a/includes/view-helpers/class-giglogadmin-concertform.php b/includes/view-helpers/class-giglogadmin-concertform.php index 5cc3a47..cf7a466 100644 --- a/includes/view-helpers/class-giglogadmin-concertform.php +++ b/includes/view-helpers/class-giglogadmin-concertform.php @@ -66,7 +66,7 @@ if ( ! class_exists( 'GiglogAdmin_ConcertForm' ) ) { . '' . $this->get_venue_selector( $c->venue() ) . '
' // date has to be formatted else it is not red in the date field of html form . '' - . '
' + . '
' . '' . '
' . '' diff --git a/includes/view-helpers/class-giglogadmin-concertstable.php b/includes/view-helpers/class-giglogadmin-concertstable.php index 1288cbd..9bf848c 100644 --- a/includes/view-helpers/class-giglogadmin-concertstable.php +++ b/includes/view-helpers/class-giglogadmin-concertstable.php @@ -291,7 +291,7 @@ if ( ! class_exists( 'GiglogAdmin_ConcertsTable' ) ) { $content .= ''; $content .= - '' . date( 'd.M.Y', strtotime( $concert->cdate() ) ) . '' + '' . $concert->cdate()->format( 'd.m.Y' ) . '' . '' . strtoupper( esc_html( $concert->cname() ) ) . '' . '' . esc_html( $concert->venue()->name() ) . ''; -- cgit v1.2.3