Jump to content

Template talk:Use dmy dates

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

Template not working on a certain article

[edit]

I can't figure out why this template isn't working at William Jennens (Royal Navy officer). ~WikiOriginal-9~ (talk) 17:49, 27 November 2024 (UTC)[reply]

The template doesn't do anything. It is just a notice so that editors and bots know which date format to use when adding dates to the article.
Trappist the monk (talk) 17:53, 27 November 2024 (UTC)[reply]
It probably actually is working on the one templated reference to DNB in the note at the bottom of the article. The citation templates know how to reformat the dates to match the template format. But because that reference has only a year as a date, you don't see it working. I don't know offhand whether the {{date}} template knows about this template, but if it did you could use it to convert the other dates in article text. Or you could just convert them manually. —David Eppstein (talk) 19:08, 27 November 2024 (UTC)[reply]
Correction: it does do something - it puts the page onto an appropriate subcategory of Category:Use dmy dates. --Redrose64 🌹 (talk) 21:52, 27 November 2024 (UTC)[reply]

Edit request to complete RfD nomination

[edit]

Template:Mdy has been listed at Redirects for discussion (nomination), but it was protected, so it could not be tagged. Please add:

{{subst:rfd|showontransclusion=1|content=

to the top of the page and }} to the bottom to complete the nomination. Thank you. Daask (talk) 19:07, 18 January 2025 (UTC)[reply]

 Not done: The RfD was withdrawn. --Redrose64 🌹 (talk) 21:49, 18 January 2025 (UTC)[reply]

Why does documentation say that the bot that updates the date also corrects things?

[edit]

Template:Use dmy dates/doc says "After an article is tagged, periodic script or bot runs clean up formats, correcting any new introductions since the bot's last visit, and updating the tracking date parameter in the {{Use dmy dates}} template." I don't think this is true. I edited Louis, Prince of Hesse and by Rhine, inserting {{use dmy dates}}, intentionally leaving "Louis joined the NSDAP on May 1, 1937" unchanged. Along came AnomieBOT, inserting the month and year but not fixing this mdy date. —Anomalocaris (talk) 18:28, 16 March 2025 (UTC)[reply]

I don't know about any bot runs, but I have seen people using User:Ohconfucius/script/MOSNUM dates to make the dates consistent. – Jonesey95 (talk) 18:45, 16 March 2025 (UTC)[reply]
Jonesey95: OK, installed User:Ohconfucius/script/MOSNUM dates and ran it on Louis, Prince of Hesse and by Rhine. This will save a lot of time over manually fixing dates as I have done in the past. I still think the documentation is not true. —Anomalocaris (talk) 21:06, 16 March 2025 (UTC)[reply]
Just remember the script isn't perfect. For example, the formats of dates in quotations shouldn't be changed. Jc3s5h (talk) 14:48, 19 May 2025 (UTC)[reply]
I think the statement is one of vison rather than actuality. The period was expected to be about a year, the idea being to fix any incorrectly formatted dates that had entered the article since tagging/the previous run. There is some manual user effort in this area, running about 12 years behind the current date. Mostly fixes are probably on-the-fly by people running scripts doing other jobs. It's not a bad suggestion that newly tagged articles should get some loving attention, but we would have to distinguish between newly tagged and recently checked. All the best: Rich Farmbrough 11:31, 19 May 2025 (UTC).[reply]
The inaccurate text about bots has been in the template documentation long enough. I have removed it, leaving references to scripts, which are accurate, as far as I know. – Jonesey95 (talk) 15:09, 19 May 2025 (UTC)[reply]

Is a mdy and dmy conflict handled?

[edit]

While I will admit to having too many things on my mind right now, it certainly appears that one can add both {{use mdy dates}} and {{use dmy dates}} to the same article. Is this handled? It should be. Fred Gandt · talk · contribs 16:55, 15 September 2025 (UTC)[reply]

As far as cs1|2 is concerned, Module:Citation/CS1/Configuration has a list of patterns derived from the template canonical names ({{Use dmy dates}}, {{Use mdy dates}}) and associated redirects ({{Use MDY dates}}, {{Use DMY dates}}, {{mdy}}, {{Use dmy}}, {{Use mdy}}, etc). The list is ordered by frequency of use at the time that the list was compiled. {{Use dmy dates}} was by far the most commonly used template name (1159k transclusions) with {{Use mdy dates}} a distant second (212k transclusions). cs1|2 searches the article wikitext for each template canonical name/redirect starting at the top of the list and working down. cs1|2 stops searching once a {{use xxx dates}} template or recognized redirect is found so an article with both {{use dmy dates}} and {{use mdy dates}} will cause cs1|2 to render dates in dmy format. Today the two canonical name transclusion counts have moved somewhat closer: 1902k vs 1010k.
I do not know how the various scripts that tweak date formats handle a conflict. Perhaps Editor Ohconfucius will answer that part of your question.
Trappist the monk (talk) 17:35, 15 September 2025 (UTC)[reply]
Regardless of how the software handles it, I think having both templates on a single article is simply a mistake that should be corrected. —David Eppstein (talk) 18:14, 15 September 2025 (UTC)[reply]
According to this simple search, there are fewer than ten such articles.
Trappist the monk (talk) 19:35, 15 September 2025 (UTC)[reply]
Also the corresponding conflict for English variant - see this edit, including the two lines that follow the removed line. --Redrose64 🌹 (talk) 20:20, 15 September 2025 (UTC)[reply]
Indeed. See some search links at this Template:EngvarB discussion. Maybe a report could be designed to dig up duplications like these. – Jonesey95 (talk) 20:31, 15 September 2025 (UTC)[reply]
There's nothing that I know of that handles them automatically and in my experience I think it's probably better that we don't. There used to be hundreds of them until some mystery contributor and myself got the numbers down. It now usually hovers around 7 articles. They're usually the result of information being merged in a suboptimal way, someone slapping the other tag on an article in an OWN manner or a bot that's not as clever as its owner wants it to be. They usually need a number of things fixing besides the date template. I use this custom search to find articles that contain both templates. Not sure if that catches redirects and alternative names though. - X201 (talk) 20:41, 15 September 2025 (UTC)[reply]
@Trappist the monk: simply establishing correct format from the first declaration found is certainly very convenient. When I looked into how {{short description}}s were handled while building Module:GetShortDescription, it became quite the palaver to build a test suite and algorithm for all the bizarre possible edge cases. The fact that these date format preferences do almost nothing but categorize the page is a bonus, but establishing which of multiple is actually correct would require manual review and intervention (without an unreasonable effort to programmatically analyze the history). My comment now, of course, is coming after a lot of activity to create database reports and the like, but it's worth considering that all of this guesswork and manual review can be avoided by a more robust set of mechanisms built in. I really think each date format (and engvar to boot) template should check if it's being placed on a page with an already present fellow, and do something proactive about it. Fred Gandt · talk · contribs 20:22, 16 September 2025 (UTC)[reply]
It is sometimes easier to fix problems after they occur, especially if they occur rarely, than to complexify a simple, widely used bit of code. The above conflict is currently present in just six articles out of six million or so. – Jonesey95 (talk) 20:44, 16 September 2025 (UTC)[reply]
I guess that I concur with Editor Jonesey95. If we do, someday, decide to do summat about conflicting templates, we should probably merge the functionality into a single template with named parameters; perhaps summat like this:
{{article config |dates=dmy |engvar=british}}
Trappist the monk (talk) 21:49, 16 September 2025 (UTC)[reply]
A wise suggestion Trappist. I appreciate the argument Jonesey, but with caching and other optimizations, the minimal additional work required to show a preview warning and possible other measures (so many options) on page save would have little meaning. It's fine if we never agree; I'm a "fix it before it breaks" type, but have no intention of pushing :‍)
Assuming the "fix it after it breaks" approach is the rut we drive in for a while, perhaps a bot can be employed to deal with these things (in the event that humans are unavailable, clueless or unwilling). I think it'd be trivial for a bot to figure out which came first, but not necessarily which should be used, so to ensure the issue does get some attention, perhaps visibly tagging the article as having conflicted formatting instructions that may result in undesirable display and categorization, so any passer by might do the necessary review and cleanup? Fred Gandt · talk · contribs 22:36, 16 September 2025 (UTC)[reply]
Yeah, "which came first" isn't necessarily right. I made this edit while glancing over the results from the engvar conflicts report, and an identical one to a similarly-named article; the date given in the use-indian-english template was two years before the article was created, and actually placed four years before the use-new-zealand-english template, but NZ was the correct one to retain per MOS:TIES. These are going to need a human to look at, every one. And for all I know, it might even be correct for some of these articles to keep two engvar templates indefinitely. —Cryptic 00:33, 17 September 2025 (UTC)[reply]
Indeed. I recently added {{Use American English}} per MOS:RETAIN (since there are no strong ties) and {{Use mdy dates}} per MOS:DATERET to Pigeon racing. I had to walk through the history one diff at a time looking for first instances of distinct engvar and date formats. The article was started in May 2003, and the engvar established quite early in July 2005, so that wasn't too bad, but the first full date to establish format didn't come until October 2013. I made notes of the Special:Diffs <!--alongside the templates--> so no one ever has to go through that labour again. I'd love to see simple toggles built into the UI, active for users with required perms, to dial these things in as a content setting, but that's a conversation for another place and time I think.
In cases where archived and/or remote discussions have resulted in changes to the usages, or where multiple variants have been established as acceptable (I suspect that may be the case for the Rupert Murdoch article), getting to the bottom of it without a familiarity with that history would be a job of work, and a bot wouldn't stand a chance of figuring it out (efficiently and reliably). This again is why I made notes about how the usages were established – something that could be valuable as a param in these templates, perhaps to a permalink or diff. Fred Gandt · talk · contribs 01:57, 17 September 2025 (UTC)[reply]
Template:Use does exactly that. But I don't see how it'll help fix or prevent conflicts - you could still have {{use|dmy|gb|date=January 2001}} at the top of the article and {{use|mdy|us|date=January 2000}} at the bottom next to the categories anyway, like we currently see with {{use mdy dates}} and {{use dmy dates}}. (And significantly more widely with the engvar templates than the date ones - there's about 300 articles affected with those.) —Cryptic 00:28, 17 September 2025 (UTC)[reply]
I think (correct me if I am wrong Trappist) that the combination's value in this case would be if the template ran code to check its situation and act accordingly. It's not that combining them would solve the conflict, but that code built in to help in resolving it, would only have to run and be maintained in that one template/module. Fred Gandt · talk · contribs 01:57, 17 September 2025 (UTC)[reply]

New database report

[edit]

Cryptic has helped me create a database report that lists article-space conflicts between "Use" templates. Wikipedia:Database reports/Multiple "Use" templates is in a rudimentary state right now. Someone well-versed in SQL could probably figure out how to write a query that finds "any two of the following list of templates: Use XX English, Use YY English, Use ZZ English, etc." (It may be easier to look for pages that are in two or more subcategories of Category:Wikipedia articles written in a national variety of English.) The report currently refreshes daily and can be refreshed manually. – Jonesey95 (talk) 22:52, 15 September 2025 (UTC)[reply]

Working on that already. It's going to need a different approach than just that pairwise comparison - two or more of three templates would be feasible, but two or more of 22 isn't. And, yes, since they're all direct subcats of Category:Wikipedia articles written in a national variety of English, and don't have any subcats of their own, going by category will be much easier. —Cryptic 22:55, 15 September 2025 (UTC)[reply]
quarry:query/97200. —Cryptic 23:17, 15 September 2025 (UTC)[reply]
(Also, if you keep on adding pairs of templates to that query, at some point it's probably going to abruptly tip over from needing another 10 to 20 seconds per additional pair to multiple hours. Bring it back to RAQ if/when that happens. —Cryptic 22:56, 15 September 2025 (UTC))[reply]
Very nice! There are now two reports:
Thanks to Cryptic for these helpful queries. – Jonesey95 (talk) 00:43, 16 September 2025 (UTC)[reply]

Well, that escalated quickly. I think it's fair to say you all have it handled. Good job team ;) Fred Gandt · talk · contribs 00:49, 16 September 2025 (UTC)[reply]

Inconsistent regional spellings

[edit]

This template documentation is using inconsistent British and American spellings. 2604:3D08:9476:BE00:34C1:DC92:C15D:3454 (talk) 02:39, 1 October 2025 (UTC)[reply]

We have a section in the "Manual of Style" which says articles should use a consistent variety of English. But the "Manual of Style" only applies to articles, not template documentation. Jc3s5h (talk) 03:12, 1 October 2025 (UTC)[reply]
Yeah… but I feel like this template documentation should too. 2604:3D08:9476:BE00:34C1:DC92:C15D:3454 (talk) 04:58, 1 October 2025 (UTC)[reply]
Non-article space items are not required to meet the standards of articles. - X201 (talk) 07:36, 1 October 2025 (UTC)[reply]
Can you point out any particular instances of inconsistency? Strictly speaking, we don't have to fix them but if it is just a few small changes then we may as well fix them.  Stepho  talk  11:02, 1 October 2025 (UTC)[reply]
I found "flavour" and "recognized", FWIW. I have no opinion on whether they should be changed, except that "flavour" should probably be changed to "format" to be more accurate and encyclopedic. I have made that change. – Jonesey95 (talk) 11:19, 1 October 2025 (UTC)[reply]