Template talk:Time ago

Latest comment: 8 days ago by NapoliRoma in topic Use of this template in article body text?

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 ago

{{time ago|-0 months|min_magnitude=months}} -> 0 months ago

{{time ago|-0 hours|min_magnitude=hours}} -> 0 hours ago

{{time ago|-0 minutes|min_magnitude=minutes}} -> 0 minutes ago

{{time ago|-0 seconds|min_magnitude=seconds}} -> 0 seconds ago

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

Use of this template in article body text?

edit

I just encountered this in the body of an article for the first time. I had already spotted several WP:RELTIME problems in the article, so my first assumption before I opened it for editing was that this was another one (even though the math checked out):

FieldTurf was installed 13 years ago in the summer of 2011...

I feel like using this template in this way is problematic; it's a little jarring to have the article be self-aware like this, and I'm guessing it will bug other RELTIME-aware editors. It's at the very least redundant -- yes, 2011 was indeed 13 years ago, tyvm for doing the math for me.

Because of this I'd like to add something to the template doc discouraging its use in body prose (excluding well-defined areas such as infoboxes). Any objections? NapoliRoma (talk) 21:00, 23 November 2024 (UTC)Reply