Template talk:Time ago
This is the talk page for discussing improvements to the Time ago template. |
|
Archives: 1Auto-archiving period: 90 days |
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
Unnatural "0 days ago" and "0 days' time"
[edit]These are very small and short-lived problems, but I did notice the "0 days ago" on Benedict XVI's article today.
{{time ago|{{#time:Y|now}}-{{#time:n|now}}-{{#time:j|now}}|min_magnitude=days}}
-> 0 days ago
{{time ago|{{#time:Y|now+1 days}}-{{#time:n|now+1 days}}-{{#time:j|now+1 days}}|min_magnitude=days}}
-> 0 days' time
{{time ago|-0 years|min_magnitude=years}}
-> 0 years' time
{{time ago|-0 months|min_magnitude=months}}
-> 0 months' time
{{time ago|-0 hours|min_magnitude=hours}}
-> 0 hours' time
{{time ago|-0 minutes|min_magnitude=minutes}}
-> 0 minutes' time
{{time ago|-0 seconds|min_magnitude=seconds}}
-> 1 second's time
I think all these "0 X's ago"s are unnatural, like they seem very robotic or procedural.
So I propose this template simply prints out "today" and "tomorrow". And for completeness, do "this year" for 0 years ago, "this month" for 0 months, etc. And then maybe "right now" for 0 seconds ago. Brightgalrs (/braɪtˈɡæl.ərˌɛs/)[ᴛ] 17:22, 31 December 2022 (UTC)
- Closer to the programmer mindset is the complete omission of output in case of 0. What do the maintainers have to say (@Mr. Stradivarius, Johnuniq, and Thryduulf:)? Nxavar (talk) 14:37, 19 July 2024 (UTC)
- And even closer to the programmer mindset is leaving it as-in. Having no output would look even weirder. Take the Pope Benedict XVI example, you'd have "Died" and then an empty space in his infobox. Brightgalrs (/braɪtˈɡæl.ərˌɛs/)[ᴛ] 13:58, 20 July 2024 (UTC)
- Perhaps something like "less than a (unit)" (with appropriate adjustment to the article for units starting with a vowel sound). isaacl (talk) 14:12, 20 July 2024 (UTC)
- Yeah that might be best. But I think you'd still get some weird things. For instance, imagine you set it to display years, and then someone dies, and you look at the article the same day. You'd get "Died" and then "Less than a year ago". Technically true, but extremely awkward, no one would ever say that. On the other hand, "this year" feels more universal - you could say that the day after someone died without any raised eyebrows. There's something with English semantics going on here, it's very hard to wrap my head around. Brightgalrs (/braɪtˈɡæl.ərˌɛs/)[ᴛ] 14:26, 24 July 2024 (UTC)
- The
|min_magnitude=
parameter can be set to days for that case. isaacl (talk) 14:33, 24 July 2024 (UTC)- My point is "this year", and the like, is a general case that would cover all cases, even ones that can't be foreseen. I've got birthdays on my mind since it's what sparked this whole discussion, but this template is used for many things. Brightgalrs (/braɪtˈɡæl.ərˌɛs/)[ᴛ] 12:26, 8 August 2024 (UTC)
- @Brightgalrs, I like the "this year" idea. It might also be possible to adjust the output based on the precision of the date you're given: If you're given the {{CURRENTYEAR}}, then zero produces an output of "this year", but if you're given the date down to {{CURRENTMONTH}}, then it's "this month", and a {{CURRENTDAY}}-level of precision could return "today". WhatamIdoing (talk) 04:27, 20 October 2024 (UTC)
- My point is "this year", and the like, is a general case that would cover all cases, even ones that can't be foreseen. I've got birthdays on my mind since it's what sparked this whole discussion, but this template is used for many things. Brightgalrs (/braɪtˈɡæl.ərˌɛs/)[ᴛ] 12:26, 8 August 2024 (UTC)
- The
- Yeah that might be best. But I think you'd still get some weird things. For instance, imagine you set it to display years, and then someone dies, and you look at the article the same day. You'd get "Died" and then "Less than a year ago". Technically true, but extremely awkward, no one would ever say that. On the other hand, "this year" feels more universal - you could say that the day after someone died without any raised eyebrows. There's something with English semantics going on here, it's very hard to wrap my head around. Brightgalrs (/braɪtˈɡæl.ərˌɛs/)[ᴛ] 14:26, 24 July 2024 (UTC)
Requesting error-tracking category
[edit]This template currently generates Error: first parameter cannot be parsed as a date or time. when there is an error, but pages are not tracked in a category so that they can be fixed. Can someone please add Category:Pages using Time ago template with errors or something similar, probably wrapped in {{Main other}}, so that these errors can be tracked? The error message is currently visible at Comparison of issue-tracking systems. – Jonesey95 (talk) 15:35, 12 January 2023 (UTC)