Template talk:Timeline-event

Problem
When end_date is used together with date, the template appears like so: Is there any way one can code the template, so that a space appears both before and after the en dash for full dates only? So that if a year is inputted like so... ... There is no space before and after the dash. I tried copying 's edit here with this edit, which I thought worked. But if one were to use date on its own... ... It appears like so: I am not quite sure how to solve this.--Nev&eacute;–selbert 22:47, 9 September 2017 (UTC)
 * April 21, 2012 – : Something happened
 * The issue is that the  is it's own if statement. In Izkala's diff you gave above,  was always used. Thus, I just added in an extra #if statement around the whole thing to check if end_date existed. Primefac (talk) 23:13, 9 September 2017 (UTC)

Unspaced dash
I don't quite understand the remarks above about an unspaced en dash for years only.

" " produces

"". That en dash ought to be unspaced. -- Michael Bednarek (talk) 15:23, 11 February 2020 (UTC)