Skip to content
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

Merged
merged 8 commits into from
Jan 13, 2023
Merged

OEL-1915: Add Date to the Event teaser. #203

merged 8 commits into from
Jan 13, 2023

Conversation

drishu
Copy link
Contributor

@drishu drishu commented Dec 19, 2022

No description provided.

@drishu drishu force-pushed the OEL-1915 branch 2 times, most recently from bae88ce to 4ca0ec8 Compare December 19, 2022 09:39
* @param array $variables
* Render array variables.
*/
function _oe_whitelabel_starter_event_preprocess_date(array &$variables): void {
Copy link
Contributor Author

@drishu drishu Dec 19, 2022

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')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it correct to show the year twice when it's the same?
image
Maybe it's something to ask the designers.

@brummbar brummbar merged commit 29444d1 into 1.x Jan 13, 2023
@brummbar brummbar deleted the OEL-1915 branch January 13, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants