Template talk:Time ago

Latest comment: 1 hour ago by Brightgalrs in topic Unnatural "0 days ago" and "0 days' time"

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)Reply

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)Reply
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)Reply
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)Reply
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)Reply
The |min_magnitude= parameter can be set to days for that case. isaacl (talk) 14:33, 24 July 2024 (UTC)Reply
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)Reply

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)Reply