Template talk:Timeline-event
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
Problem
[edit]This help request has been answered. If you need more help, you can , contact the responding user(s) directly on their user talk page, or consider visiting the Teahouse. |
When |end_date=
is used together with |date=
, the template appears like so:
- April 21, 2012Another thing happened – November 18, 2012 :
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...
- 2012–2013: Another thing happened
... There is no space before and after the dash. I tried copying Izkala's edit here with this edit, which I thought worked. But if one were to use |date=
on its own...
{{Timeline-event |date={{Start date|2012|04|21}} |event= Something happened}}
... It appears like so:
- April 21, 2012 – {{{end_date}}}: Something happened
I am not quite sure how to solve this.--Nevé–selbert 22:47, 9 September 2017 (UTC)
- The issue is that the
{{#if:{{#invoke:String...
is it's own if statement. In Izkala's diff you gave above,{{{end}}}
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
[edit]I don't quite understand the remarks above about an unspaced en dash for years only.
"{{Timeline-event|date={{Start date|1887}}|end_date={{End date|1888}}|location=Leipzig}}
" produces
"1887 Leipzig". That en dash ought to be unspaced. -- – 1888 : Michael Bednarek (talk) 15:23, 11 February 2020 (UTC)