Single date and time rendering incorrect

Created on 6 December 2024, 17 days ago

Problem/Motivation

We have a use case where an editor can enter a start and end date with the same values. This will render incorrectly since the module assumes that if the start and end date timestamps are the same the configured date format does not include time.

In our case we have the following setting:

  • Date format for the single day date range (one_day) -> j F Y H:i-{H}:{i}

This will render as follows with the same date and time:

12 October 2017 09:00-{09}:{00}

Proposed resolution

I see two possible solutions:

  1. We (re)introduce a format for a single day with a single time. this would make the output of the example above to be configured to look like this: 12 October 2017 09:00
  2. We use the same logic to render the output for all options. This would make the output of the example above look like: 12 October 2017 09:00-09:00

My preference is option 1, but we could implement both options and allow the module user to configure what is needed. And avoid a wrong rendering due to a missing end date in the code.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇳🇱Netherlands pefferen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024