diff --git a/src/class-last-modified-date.php b/src/class-last-modified-date.php index 5e19e41..0fc2b5a 100644 --- a/src/class-last-modified-date.php +++ b/src/class-last-modified-date.php @@ -33,14 +33,10 @@ public function get_last_modified_date(): ?DateTimeImmutable { /** * Sets the date of the last modification based on the latest batch of videos. * - * @param string $last_modified_date The date of the last modified video in the batch. + * @param DateTimeImmutable $last_modified_date The date of the last modified video in the batch. * @return void */ - public function set_last_modified_date( string $last_modified_date = '' ): void { - $last_modified_date = DateTimeImmutable::createFromFormat( DATE_W3C, $last_modified_date ); - - if ( $last_modified_date instanceof \DateTimeImmutable ) { - $this->last_modified_date = $last_modified_date; - } + public function set_last_modified_date( DateTimeImmutable $last_modified_date ): void { + $this->last_modified_date = $last_modified_date; } }