Date Range with endash should exclude spaces

Created on 7 July 2025, 7 days ago

Problem/Motivation

We use this module, but we had to remove the spaces around the endash by editing src/ApStyleDateFormatter.php in version 1.9, and I still see the latest version includes these spaces. Everything I read claims there are no spaces when using the endash in a date/time range.

Ranges with the endash should appear as:

  • July 24, 2025, 3–5 p.m.
  • July 24–25, 2025

not:

  • July 24, 2025, 3 – 5 p.m.
  • July 24 – 25, 2025

Proposed resolution

I included a patch against the latest code from GitHub which demonstrates the fix for this issue, since we have to do this for our production environment.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024