Jump to content

Template talk:Start date and age

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Thomas H. White (talk | contribs) at 19:04, 15 December 2024 (Issue with year off by one within "Infobox radio station" template: Update). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Removal of {{Error}}

Wbm1058, to answer the question in Special:Diff/1099411584 – the problem is visible on every page that uses it. Please take a look at Template:Start date and age/testcases. —⁠andrybak (talk) 16:52, 20 July 2022 (UTC)[reply]

Thanks andrybak. Sorry I did not check the test cases. My bad. wbm1058 (talk) 16:57, 20 July 2022 (UTC)[reply]
Doh. I removed {{error but neglected to remove the closing }}wbm1058 (talk) 17:04, 20 July 2022 (UTC)[reply]

I have a change ready in the sandbox which will just return blank when parameters 1, 2, and 3 are all missing. Editors are pulling Wikidata to use for this template's parameters and often there is no date in Wikidata. This is considered "normal" so returning an error has been problematic. For example in the Python (programming language) infobox. I was reverted after I removed Wikidata-filled parameters where Wikidata was not returning any "latest preview date". See the relevant test cases. The new behavior is to only show the error when parameter 1 is missing and parameter 2 and/or 3 are not missing. If there are no timely objections I will make the sandbox code go live. – wbm1058 (talk) 18:22, 20 July 2022 (UTC)[reply]

Template-protected edit request on 26 April 2023

I think we need prehistoric years (0BC and before) to be included. 50.39.178.57 (talk) 03:56, 26 April 2023 (UTC)[reply]

 Not done for now: please establish a consensus for this alteration before using the {{Edit template-protected}} template. BilCat (talk) 04:03, 26 April 2023 (UTC)[reply]
Also: (i) there is no such year as 0BC - the year before AD 1 is 1 BC; (ii) that is not the meaning of "prehistoric". --Redrose64 🌹 (talk) 16:21, 26 April 2023 (UTC)[reply]
It's possible to use a negative year:
-2833; 4857 years ago (-2833)
But "2833 BC" as output would be better. --Kallichore (talk) 21:01, 26 April 2023 (UTC)[reply]
 Not done. This is a documented limitation of the template, for reasons outside of the template's control. – Jonesey95 (talk) 22:39, 26 April 2023 (UTC)[reply]

Use outside infoboxes

Template:Start date#When not to use this template explicitly states that it is not to be used outside microformat-emitting templates or table rows. Does the same restriction apply here? If so, why isn't it documented? --Redrose64 🌹 (talk) 22:22, 10 August 2024 (UTC)[reply]

Wrong output

Hi, for article Python (programming language) and in the Infobox and in "Stable release" part, the output is:

3.12.6 / 7 September 2024; 16 days ago

which is the output of this code:

| latest release date = {{start date and age|{{wikidata|qualifier|single|P548=Q2804309|P348|P577}}}}

there is 18 days between 25th September (today) and 7th of September of 2024 (the argument from Wikidata). Here the output of this template is wrong. Please inspect. Thanks, Hooman Mallahzadeh (talk) 07:44, 25 September 2024 (UTC)[reply]

@Hooman Mallahzadeh: It says 18 days ago. I do not see what the problem is. --Redrose64 🌹 (talk) 17:00, 25 September 2024 (UTC)[reply]
@Redrose64 It is probably due to caching mechanism. The output of this template is the cached output. Until the cache is not cleared, the value is wrong. For myself, the output updated to 18 days, which is related to yesterday. Correct output for today is 19 days. We should use some mechanism to avoid caching for this template. Hooman Mallahzadeh (talk) 03:56, 26 September 2024 (UTC)[reply]
@Hooman Mallahzadeh: Did you try a WP:PURGE before posting here? --Redrose64 🌹 (talk) 14:59, 26 September 2024 (UTC)[reply]
@Redrose64 This behavior for this template causes wrong output in ordinary applications that no purge is done in ordinary browsers like FireFox. Is there any way to correct output of the template without purging? Hooman Mallahzadeh (talk) 15:04, 26 September 2024 (UTC)[reply]
No, because it's not caused by this template - it's because the MediaWiki software doesn't reparse pages on the offchance that {{CURRENTYEAR}} etc. (see Help:Magic words#Current_date_and_time) might have changed since the last time that the page was parsed. It's also nothing to do with the browser, because purging is performed server-side not client-side. --Redrose64 🌹 (talk) 21:05, 26 September 2024 (UTC)[reply]

change to df=yes as default

According to List of date formats by country there are much more countries with a sane date format and kind of only the USA with MDY. I propose to change the df= parameter to yes by default instead of the current default (no). 2003:F1:CF4C:9300:8590:24D7:57DD:A77F (talk) 11:47, 15 December 2024 (UTC)[reply]

I agree, and this should also be applied to {{End date and age}}, {{Birth date and age}}, {{Death date and age}}, and possibly others. -- Michael Bednarek (talk) 12:44, 15 December 2024 (UTC)[reply]

Issue with year off by one within "Infobox radio station" template

I noticed this problem within page KXTG. The "infobox radio station" template has an entry for "airdate" which in this page is set as "Start date and age|1926|12|13}} (as KXL)" A page update for November 1, 2024 at: https://en.wikipedia.org/w/index.php?title=KXTG&oldid=1258821856 correctly listed this as 98 years ago. But a small change later that same day, which is still active, at: https://en.wikipedia.org/w/index.php?title=KXTG&oldid=1258871347 now lists this, in the template as well as the body of the page, as 97 years ago. - Thomas H. White (talk) 16:00, 15 December 2024 (UTC)[reply]

Both show 98 years ago for me. --Redrose64 🌹 (talk) 17:42, 15 December 2024 (UTC)[reply]
Both also show 98 years for me now - Thomas H. White (talk) 19:03, 15 December 2024 (UTC)[reply]