![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
|
|
This page has archives. Sections older than 28 days may be automatically archived by Lowercase sigmabot III when more than 3 sections are present. |
Sortable date errors with new change
Putting this here because I am woefully confused. Noticed that there were a bunch of errors on List of Cardcaptor Sakura episodes, caused by a change on this template by User:Gonnym that seems to produce an error whenever the format is non-standard (such as {{Start date|21 February 2025}} as opposed to {{Start date|2025|02|21}}). I kind of assumed this was the problem on that page, but as it turns out, it's much weirder.
Cardcaptor Sakura's episode tables have three different values -- the original airdate, the US airdate, and the Canadian airdate. The US and Canadian airdates use {{Dts}} in order for the table to be sortable -- the episodes seem to have come out in different orders in the United States and Canada, hence why you would want this table to be sortable. But the original airdate -- the one throwing up an error -- uses both Start date and Dts -- for example, {{Start date|{{dts|1998|4|7}}}}.
I am not sure what to do here. Converting that to just start date means you can't sort effectively, as Start date sorts by alphabetical order, not date order as Dts does. But converting it to Dts means that I don't think the table will include Start date data for the release dates of each episode, as most other "List of X episodes" articles seem to do. Is there any way for the Start date template to show sortable data, and what should I do if I want it to? LivelyRatification (talk) 22:53, 21 February 2025 (UTC)
- The
{{start date}}
template is not for general use. It should only be used in microformat-emitting templates (such as infoboxes), and only once per article, per its documentation. --Redrose64 🌹 (talk) 23:04, 21 February 2025 (UTC)- Yes, I read the documentation, but this sort of usage seems to be very commonplace on articles that list TV episodes -- Atlanta season 1#Episodes, Jujutsu Kaisen season 1#Episodes, My Hero Academia season 1#Episodes, to give some examples. I understand that these sorts of usages may be incorrect, and I don't want to make an argument that errors should be duplicated, but are you saying that this sort of usage -- for the primary release date of a TV episode -- is wrong, and should be replaced with something such as {{Dts}}? Because, at least from what I can tell, nothing on the Start date documentation says that it should only be used once per article, although I admit I am wholly unfamiliar with how microformats work. LivelyRatification (talk) 23:12, 21 February 2025 (UTC)
- This has been dealt with before, see the archives and also #Is it considered a misuse to use this template to format dates outside of infoboxes? above. But
{{dts}}
is expressly designed for use inside tables. --Redrose64 🌹 (talk) 08:11, 22 February 2025 (UTC)
- This has been dealt with before, see the archives and also #Is it considered a misuse to use this template to format dates outside of infoboxes? above. But
- Yes, I read the documentation, but this sort of usage seems to be very commonplace on articles that list TV episodes -- Atlanta season 1#Episodes, Jujutsu Kaisen season 1#Episodes, My Hero Academia season 1#Episodes, to give some examples. I understand that these sorts of usages may be incorrect, and I don't want to make an argument that errors should be duplicated, but are you saying that this sort of usage -- for the primary release date of a TV episode -- is wrong, and should be replaced with something such as {{Dts}}? Because, at least from what I can tell, nothing on the Start date documentation says that it should only be used once per article, although I admit I am wholly unfamiliar with how microformats work. LivelyRatification (talk) 23:12, 21 February 2025 (UTC)
- @LivelyRatification if there is an issue with sorting in {{Episode list}} please raise that issue there. Module:Episode list could probably handle the sorting automatically without needing additional input, that is if there is even an issue with the sorting to begin with. In any case, entering non-number values in {{Start date}} produces incorrect data (behind the scenes). Gonnym (talk) 18:52, 23 February 2025 (UTC)
- @Gonnym: I believe the specific issue I was dealing with (which, fwiw, I've fixed by just replacing {{Start date}} with {{dts}} ) is because {{Episode list}} is not sortable by default -- on this page, it's been bodged on the top because of the issue I mentioned where episodes came out in a different order for the US and Canada. You can check for yourself, but when I change the template to {{Start date}}, it sorts in alphabetical order --> i:e, April --> June --> May instead of April --> May --> June.
- But I do not know if I am supposed to use {{Start date}} or not in this instance, because another editor has stated that it's obviously incorrect, and yet the {{Episode list}} template advises me to use it for the original air date of a television episode -- and as I have said, a myriad of other similar pages do the exact same thing. If I am supposed to use {{Start date}}, then I'll raise the issue on the module page, but I'm unsure if I'm even supposed to. LivelyRatification (talk) 21:23, 23 February 2025 (UTC)
- {{Episode list}} must use {{Start date}} per the template documentation. Pages that don't are added to Category:Episode lists with unformatted air dates which is regularly fixed by editors or a bot. If the usage of {{Start date}} is incorrect there, or produces inadequate results, those issues should be raised at Template talk:Episode list Gonnym (talk) 21:34, 23 February 2025 (UTC)
- I arrived here because I noticed a bunch of "Not a number value" errors on the List of Max & Ruby episodes page. I'm not sure I totally understand the change to this template that caused this. I guess the claim is that invocations such as {{Start date|October 7, 1988}} have always been broken? If so, I'm ok with this change, but one thing that puzzles me is the {{End date}} template has not been changed correspondingly, so, for example, on that page the {{Start date}} invocations are all emitting errors but the {{End date}} templates which are formatted the same way are not. Should this same change be made to {{End date}} as well? CodeTalker (talk) 20:20, 23 February 2025 (UTC)
- You are correct, plain text usage has always been invalid and while it displayed the text, it didn't do what the template is meant for. I've been fixing many of the errors and recently a bot has started which is doing it even faster (and better). {{End date}} hasn't been updated yet because I didn't want to start new errors before we've fixed the first one (the bot btw, is fixing End date errors found on the same page). Gonnym (talk) 21:37, 23 February 2025 (UTC)
Request to remove unsupported parameters from Template:start date transclusions
IIRC, Primefac has a bot task that can remove unsupported parameters. This template has recently been modified to flag unsupported parameters, and it appears that the most common unsupported parameter by far is |mf=
(more than 5,000 of the 6,000 pages in the error category). It doesn't do anything. I don't like to just remove unsupported parameters before checking on their history, and here's what I've learned: 1. the parameter was apparently never in the code (at least according to the wikiblame search), and 2. the parameter was intended as the opposite of |df=
(day first format, aka DMY formatting), but it was not implemented. MDY or "mf" (month first) is the default, as you can see on the template's doc page.
So it appears to me that removing instances of |mf=
completely, as in this edit, would be a valid bot task. The relevant pages are listed at Category:Pages using start date with invalid valuesCategory:Pages using start date with unknown parameters. – Jonesey95 (talk) 17:09, 23 February 2025 (UTC)
- I can have a bot run through, though it would help to know what bad params are being shown. So far I've seen
|abbr=
and|br=
but I'm sure there are others further down the alphabet. Primefac (talk) 18:25, 23 February 2025 (UTC) - @Jonesey95 meant to link Category:Pages using start date with unknown parameters. A few others that I noticed are
|p=
which I have no idea what that is|timezone=
which we do have|7=
, however|timezone=yes
is not a valid value, which seems to be used.|dm=
might be meant for|df=yes
.
- Gonnym (talk) 18:48, 23 February 2025 (UTC)
- Looking at the TemplateData monthly report, it appears that
|br=
is used 98 times,|p=
is used 113 times, and all of the usages can be removed. They are no-op parameters that are typically set to "y" or "yes". I would not remove|timezone=
or|time=
; the articles where they are used mostly need manual processing anyway. Other invalid parameter usages appear to be in the single or low double digits, so they can be processed by hand. – Jonesey95 (talk) 19:01, 23 February 2025 (UTC)- There are also invalid uses of
|4=
that could be fixed. Any usage of|4=mdy
or|4=mf-y
or|4=mf-yes
can be removed, I'm pretty sure. – Jonesey95 (talk) 01:38, 24 February 2025 (UTC)- Cat's down to 41 pages, which is a low enough number for manual fixing (about half are timezone-related). Similar numbers are found in the error cat for {{end date}}, which I ran in parallel with this run to avoid multiple edits. Primefac (talk) 02:04, 25 February 2025 (UTC)
- Many thanks. The remaining pages can be handled manually. – Jonesey95 (talk) 05:12, 25 February 2025 (UTC)
- Cat's down to 41 pages, which is a low enough number for manual fixing (about half are timezone-related). Similar numbers are found in the error cat for {{end date}}, which I ran in parallel with this run to avoid multiple edits. Primefac (talk) 02:04, 25 February 2025 (UTC)
- There are also invalid uses of
- Looking at the TemplateData monthly report, it appears that
Potential bot fixes of invalid usage
- If there is a bot or an editor with AWB willing to run through the invalid usage category,
here are 205 pages using "?" as a value. Many of them have "?" in {{End date}} as well.[eta: done.] – Jonesey95 (talk) 02:10, 24 February 2025 (UTC) - There are a bunch of articles using an invalid but consistent format with the month spelled out, like (edited to add: here are 300 articles, with some possible false positives; I would program a regex to look for valid month values in the second parameter.) – Jonesey95 (talk) 02:16, 24 February 2025 (UTC)
{{start date|2022|September|29}}
Adding: 105+ with year ranges;the fix is to remove the template entirely, leaving just the year range. False positives may be possible. – Jonesey95 (talk) 06:04, 25 February 2025 (UTC)- Adding: 330+ articles, almost all of which contain the name of a month at the start of the first parameter. These will mostly be mdy dates.
Adding: 210 articleswith a two-digit number followed by a space at the start of the first parameter. These will mostly be dmy dates. – Jonesey95 (talk) 19:10, 25 February 2025 (UTC)- If you can get a semi-definitive list of the various errors I can run a bot on them, otherwise with ~200 errors it's probably best to use AWB. Primefac (talk) 02:03, 25 February 2025 (UTC)
- Aside from the 600 above, I haven't found a giant batch of the same error, and this search for full date formats in
|1=
times out for me. Maybe someone knows a better insource search to find those, of which there are probably 1,000+. – Jonesey95 (talk) 05:59, 25 February 2025 (UTC)- I'm working on batches of them, about 100 at a time, adding patterns to my AutoEd script as I go. My script isn't foolproof, so I check every proposed edit before saving, just in case. – Jonesey95 (talk) 23:30, 25 February 2025 (UTC)
- Aside from the 600 above, I haven't found a giant batch of the same error, and this search for full date formats in
- If you can get a semi-definitive list of the various errors I can run a bot on them, otherwise with ~200 errors it's probably best to use AWB. Primefac (talk) 02:03, 25 February 2025 (UTC)
Trimming extra white space before year value
I have added code to the sandbox to fix extra white space before the year when parameter values include leading spaces. See these test cases. – Jonesey95 (talk) 16:27, 25 February 2025 (UTC)
- Looks good, I've updated the main template. Primefac (talk) 18:06, 25 February 2025 (UTC)
- Thanks for the on-topic response. – Jonesey95 (talk) 18:09, 25 February 2025 (UTC)
Side tangent on leading zeros
- I looked at the test cases, and some of the parameter values do not have leading zeros. But the documentation indicates leading zeros are not required. The documentation should agree with the behavior. Jc3s5h (talk) 16:37, 25 February 2025 (UTC)
- Leading spaces. When editors type "Start date | 1999 | 09 | 05", the template currently renders two spaces before the year. My sandbox change is intended to fix that double spacing. – Jonesey95 (talk) 16:41, 25 February 2025 (UTC)
- If you have the skill to fix the space problem, perhaps you also have the skill to verifiy that leading zeros are not required. At a minimum, your test cases should have various examples, such as
- {{Start date| 2014 | 4 | 27 |df=y}}
- {{Start date| 2014 | 04 | 27 |df=y}}
- {{Start date|2014|4|27|df=y}}
- {{Start date|2014|04|27|df=y}}
- {{Start date| 2014 | 11 | 27 |df=y}}
- If your programming and testing convinces you that leading zeros are optional, I'd urge you to adjust the documentation. A documentation adjustment should also be made if it says anything about what spaces are allowed. Jc3s5h (talk) 16:51, 25 February 2025 (UTC)
- I don't know why you are talking about leading zeros. – Jonesey95 (talk) 17:08, 25 February 2025 (UTC)
- All your test cases are technically wrong, because they defy the documentation, which states "The unnamed parameters, in order, represent the year (four digits), month (two digits)..." Jc3s5h (talk) 17:57, 25 February 2025 (UTC)
- Then update the /doc. Clearly leading zeros are not required. Primefac (talk) 18:03, 25 February 2025 (UTC)
- FFS. Nice discussion thread hijack. I have modified the documentation. Starting over: Does anyone see any problems with my changes to the sandbox or with the relevant testcases? The change, again, removes an excess space character before the year when editors insert a leading space in the year value. – Jonesey95 (talk) 18:06, 25 February 2025 (UTC)
- We edit-conflicted, see my comment above. Primefac (talk) 18:07, 25 February 2025 (UTC)
- FFS. Nice discussion thread hijack. I have modified the documentation. Starting over: Does anyone see any problems with my changes to the sandbox or with the relevant testcases? The change, again, removes an excess space character before the year when editors insert a leading space in the year value. – Jonesey95 (talk) 18:06, 25 February 2025 (UTC)
- Then update the /doc. Clearly leading zeros are not required. Primefac (talk) 18:03, 25 February 2025 (UTC)
- All your test cases are technically wrong, because they defy the documentation, which states "The unnamed parameters, in order, represent the year (four digits), month (two digits)..." Jc3s5h (talk) 17:57, 25 February 2025 (UTC)
- I don't know why you are talking about leading zeros. – Jonesey95 (talk) 17:08, 25 February 2025 (UTC)
- Leading spaces. When editors type "Start date | 1999 | 09 | 05", the template currently renders two spaces before the year. My sandbox change is intended to fix that double spacing. – Jonesey95 (talk) 16:41, 25 February 2025 (UTC)
Day, no time, time zone: document fix it?
While looking at test cases, I noticed one can write a date with a time zone, and it will render as one might expect:
{{Start date| 2014 |4|27||||Z|df=y}}
27 April 2014 (UTC)
This behavior isn't necessarily supported by other time notations. For example, it isn't clear if the corresponding time in ISO8601 would be correct syntax or not. But it could be useful. For example a newspaper gives a date but not a time for an event, but the time zone can be inferred from the location of the newspaper.
Unfortunately the metadata is clearly not correct ISO8601:
<span class="bday dtstart published updated itvstart">2014-04-27Z</span>
Should we fix this? Jc3s5h (talk) 22:52, 25 February 2025 (UTC)
- Further details are that if an hour is provided without minutes or seconds, the rendering does not contain time of day but the ISO 8601 is correct.
- {{Start date| 2022 |4|27|8|||Z|df=y}} yields the ISO 8601 2022-04-27T08Z
- If minutes are provided as well both the rendering and the ISO 8601 are correct.
- {{Start date| 2023 |4|27|8|12||Z|df=y}} yields the ISO 8601 023-04-27T08:12Z Jc3s5h (talk) 16:36, 26 February 2025 (UTC)
Template-protected edit request on 28 February 2025
Remove the input verification by restoring revisions 1276612074 and 1203900750 on {{Start date}} and {{end date}} respectively. This is needed because those changes pushed a lost of list of episodes articles over the WP:PEIS limit. See also this VPT thread. Nickps (talk) 15:13, 28 February 2025 (UTC)
- The two templates use different input validation methods. Is it possible that only one of the templates causes the problem? I have changed {{end date}} to use the same validation as {{start date}} to see if it helps, and it appears to have reduced the burden a bit. It may be possible to fix the validation code to make it use less time. – Jonesey95 (talk) 16:12, 28 February 2025 (UTC)
- Start date is by far the most problematic one because it's used many more times. For example in List of Pokémon episodes (seasons 14–present): {{end date}} is only used in the Series overview section so it's used 26 times, while {{start date}} is used in Series overview + once per episode so ~700 times. My testing on that page found that changing {{end date}} helps only slightly, while changing {{start date}} almost completely fixes the problem. Reverting only {{start date}} would probably be enough for most pages in [1], though not for the one I mentioned above. Nickps (talk) 16:55, 28 February 2025 (UTC)
- The parameter validation has been very helpful in finding 4,000+ previously hidden errors. WRT the Pokemon article, I think it should probably be split; 700 invocations of anything in a single page indicates that the page is probably trying to do too much. – Jonesey95 (talk) 18:02, 28 February 2025 (UTC)
- @Jonesey95 And it's created many new errors. A template call such as {{start date}} has gone from to 463b to 683b, and when you consider the doubling involved in nesting templates (the episode list module inside the episode list template inside the episode table module inside the episode table template inside the "List of XXX Seasons" article), and now you've added 6kb for every {{start date}} and {{end date}} template. This is causing real errors, with citations and other page content not rendering, rather than hidden errors that don't actually affect page output. --Ahecht (TALK
PAGE) 21:09, 28 February 2025 (UTC)Ten or soFour articles exceeding PEIS, versus 4,000+ articles that were not rendering dates correctly; I think I have those numbers right. Life is full of trade-offs, and I think this is a good one. List of Casualty episodes (series 21–34) has 698 instances of {{start date}} and 354 instances of {{cite episode}}, according to the NewPP limit report. List of The Late Late Show with Craig Ferguson episodes has 1,603 instances of {{start date}}! That sort of volume is bound to break down at some point. – Jonesey95 (talk) 21:23, 28 February 2025 (UTC)Four articles
No, "10 or so" was right. It was closer to 15, maybe >20, but I and others went out of our way to fix the rest. Ahecht also raised a very important point that you seemingly underestimate. Those 4000+ errors don't completely break the page. Meanwhile the PEIS errors resulted in pages looking like this. It also broke a WP:Featured list: List of Doctor Who episodes (1963–1989). I don't have an old revision link for this one since the fix involved changing transcluded pages but it was bad. Nickps (talk) 00:02, 1 March 2025 (UTC)
- @Jonesey95 And it's created many new errors. A template call such as {{start date}} has gone from to 463b to 683b, and when you consider the doubling involved in nesting templates (the episode list module inside the episode list template inside the episode table module inside the episode table template inside the "List of XXX Seasons" article), and now you've added 6kb for every {{start date}} and {{end date}} template. This is causing real errors, with citations and other page content not rendering, rather than hidden errors that don't actually affect page output. --Ahecht (TALK
- The parameter validation has been very helpful in finding 4,000+ previously hidden errors. WRT the Pokemon article, I think it should probably be split; 700 invocations of anything in a single page indicates that the page is probably trying to do too much. – Jonesey95 (talk) 18:02, 28 February 2025 (UTC)
- Start date is by far the most problematic one because it's used many more times. For example in List of Pokémon episodes (seasons 14–present): {{end date}} is only used in the Series overview section so it's used 26 times, while {{start date}} is used in Series overview + once per episode so ~700 times. My testing on that page found that changing {{end date}} helps only slightly, while changing {{start date}} almost completely fixes the problem. Reverting only {{start date}} would probably be enough for most pages in [1], though not for the one I mentioned above. Nickps (talk) 16:55, 28 February 2025 (UTC)
You must be logged in to post a comment.