-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OEL-1915: Add Date to the Event teaser. #203
Conversation
bae88ce
to
4ca0ec8
Compare
* @param array $variables | ||
* Render array variables. | ||
*/ | ||
function _oe_whitelabel_starter_event_preprocess_date(array &$variables): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't create a formatter (even though I wanted to) because it would use the date_block pattern and that is not ready for date ranges, and updating that seems a lot of work out of scope (I'll prep a ticket for it).
/** @var \Drupal\Core\Datetime\DrupalDateTime $end */ | ||
$end = $dates->get('end_date')->getValue(); | ||
|
||
if (!empty($end) && $start->format('d-m-y') !== $end->format('d-m-y')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.