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
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
| 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]
@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]
@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]
Yes, the backend of the template now uses Module:Date time to validate the data. The template always expected numbers, split into different parameters, it now just gives an error indicating that. Gonnym (talk) 10:34, 17 March 2025 (UTC)[reply]
Someone needs to update the Template documentation to reflect this seeing this issue everywhere they didnt even try to change it ahead of time Isla🏳️⚧ 10:40, 17 March 2025 (UTC)[reply]
What's the recommended fix for this? e.g. where it has
latest release date = {{start date and age|{{wikidata|qualifier|P348|P577}}}}
what should this be changed to (or is it something that can be changed in the template itself?)
I've reverted my changes for now, but to answer your question, there doesn't seem to be a fix for that with the current templates. The wikidata returns one string. This produces code that visually looks like it works, but in practice does not produce a valid ISO 8601 string which is the only reason to use this template. If a template is wanted that only produces a visual "time ago" number, then {{Time ago}} is the template that should be used. Gonnym (talk) 11:58, 17 March 2025 (UTC)[reply]
About recent template changes
Gonnym changed the date and age templates, including this one, which caused the "All values must be integers" error to appear on over 2000 pages; now I have to edit some of them myself as there's no automatic way to fix it yet. Purplneon486 (talk) 11:35, 17 March 2025 (UTC)[reply]
It would make even more sense if a changed template would deal with parameters the same way the previous template did. Many templates accept a variety of date formats – it's not rocket science. -- Michael Bednarek (talk) 12:38, 17 March 2025 (UTC)[reply]
I have not handled 1000+ pages like Gonnym has, but I get the sense that the previous version(s) of the template weren't really dealing with the parameters, it just looked like it did. But many people don't bother to see what microformat metadata is emitted, and many of these date-related templates claim to emit correct metadata, but don't do so consistently, and don't issue an error message when they can't emit correct metadata. Jc3s5h (talk) 21:00, 17 March 2025 (UTC)[reply]