Hi! I have an article that I would like to use this template on, but I need the output to just say "years" instead of "years ago". How would I go about doing that? I'd like to be able to put in the date a person was sentenced to death row and have the template say how long they've been on death row in years (or months and years). Bali88 (talk) 19:26, 3 July 2014 (UTC)
((Years or months ago|...))
template and tweak the output language (as one can do with say ((convert|...))
). It would seem to be a good idea to allow this one day. But, there is a way to do what you (and I) want to do, here's how: One uses the ((Time ago|...))
template. So, for example, if one wants to get the numeric difference from the current year to say 2011, one would use:((Time ago|2011|ago=))
((Age nts|...))
template. So, for example, if one wants to get the numeric difference from the current year to 1975, one would use:((Age nts|1975|1|1))
((Time ago|...))
. One can set parameters to spell out the numeric year value and/or to change the time-period magnitude. For example:((Time ago|2011|ago=|magnitude=months|spellout=yes))
((CURRENTYEAR))
Wiki-Variable along with the ((#expr:...))
Calculation template. So, for example, if one wants to get the numeric difference from the current year back to 1492, one would use:((#expr:((CURRENTYEAR))-1492))
((spellnum|...))
. But, I found it cannot parse the output of the ((Age nts|...))
template (it gives an "Invalid decimal numeral" error). It will parse ((#expr:...))
outputs though. So, one can produce this: "Columbus sailed the ocean blue five hundred and thirty-two long years ago."
((#invoke:StripToNumbers|...))
. But do note that it is still in beta-test. Here, one can use the original ((Years or months ago|...))
template. The module pulls out only the years value.((#invoke:StripToNumbers|main|((Years or months ago|2011|6))))
((#invoke:StripToNumbers|main|((Years or months ago|((CURRENTYEAR))|1))))
((Ordinal to word|...))
template. An example would be:((Ordinal to word|((#invoke:StripToNumbers|main|((Years or months ago|1952|2))))|zeroth=zeroth))
It would be nice to be able to use this template in running text in articles when a full date is known, generating something like:
The New York Times was founded 171 years ago, on September 18, 1851." (for example)
Might this be a future possibility? Thanks! 1980fast (talk) 00:20, 5 July 2023 (UTC)