Skip to content

Commit

Permalink
UHF-10619: use the date instead
Browse files Browse the repository at this point in the history
  • Loading branch information
rpnykanen committed Nov 4, 2024
1 parent e9b9413 commit 7d3a8b5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ public function getFormattedStartTime(): string {
/** @var \Drupal\Core\Datetime\DateFormatterInterface $date_formatter */
$date_formatter = \Drupal::service('date.formatter');

// @phpstan-ignore-line

Check failure on line 95 in public/modules/custom/helfi_rekry_content/src/Entity/JobListing.php

View workflow job for this annotation

GitHub Actions / tests

No error to ignore is reported on line 95.
$publication_starts_datetime = !$this->get('field_publication_starts')->isEmpty() ?
$this->get('field_publication_starts')->getValue()[0]['value'] : $this->getCreatedTime();
$this->get('field_publication_starts')->date->getTimestamp() : $this->getCreatedTime();

Check failure on line 97 in public/modules/custom/helfi_rekry_content/src/Entity/JobListing.php

View workflow job for this annotation

GitHub Actions / tests

Access to an undefined property Drupal\Core\Field\FieldItemListInterface<Drupal\Core\Field\FieldItemInterface>::$date.

return $date_formatter->format($publication_starts_datetime, 'html_date');
}
Expand Down

0 comments on commit 7d3a8b5

Please sign in to comment.