Option "separator" missing from ApStyleDateRangeFieldFormatter::viewElements()

Created on 7 July 2025, 22 days ago

Problem/Motivation

After upgrading from 1.9 to 1.10, the endash wasn't applying to my date ranges.

(version1.10 also incorrectly adds spaces around the endash, but that has been reported as a separate issue: #3534539.)

Steps to reproduce

Select an endash as a separator in 1.10, and it will still show ' to ' instead. Add 'separator' to the $opts array in ApStyleDateRangeFieldFormatter::viewElements(), and endash appears as expected. (I forgot I manually fixed this in 1.9, and was able to compare code from another machine still running version 1.9.)

Proposed resolution

Add 'separator' to the $opts array in ApStyleDateRangeFieldFormatter::viewElements(). (See attached patch)

After that patch, changing the separator between endash and "to" for an AP Style field display settings works as expected.

πŸ› Bug report
Status

Active

Version

1.10

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024