Template talk:Date table sorting/Archive 1: Difference between revisions

Content deleted Content added
MalnadachBot (talk | contribs)
m Fixed Lint errors. (Task 12)
m Fixed Lint errors on this page (html5 obsolete "font" tags replaced for "span style")
 
Line 65:
==Template:Dts/ver for invalid dates==
''19-March-2009:'' I have created the temporary variation [[Template:Dts/ver]] to allow reporting invalid dates. That template could be merged at a later time, after options are fully developed.<br>
Naturally, sometimes people are putting day-number for the month, where 21 gives "September" (21-12=9), 23 gives "November" etc. As in other templates, I was expecting an error-page-category, such as "'''Category:Template dts invalid month pages'''" which would silently list all pages with invalid month numbers passed to {</fontnowiki>{{dts}}</nowiki>. Another method, coded in [[Template:Dts/ver]], leaves the default behavior unchanged, but allows an optional verify-switch "v=yes" when invoking dts:
:::{<nowiki/>{dts/ver|v=yes |2009|78|55}} &nbsp; <--verify to report 78 & 55.
When a user sets "v=yes" then problems will display on the page:
:: &lt;br><fontspan colorstyle="color: #CC8800">'''Template:dts''' - month "78" > 12 in "2009|78|55"</fontspan>.
:: &lt;br><fontspan colorstyle="color: #CC8800">'''Template:dts''' - day "55" > 31 in "2009|78|55"</fontspan>.
That optional reporting allows each user to change pages to globally replace all "dts|" with "dts/ver|v=yes|" if they think those numbers should be reported. Of course, currently, the template handles any numbers for months/days, which some users might have assigned for special codes, such as day "32" sorts to the end of any month, so "v=yes" would be optional to allow day 32 (etc.) if used for special sorting.
 
Line 187:
:While I applaud heading in the direction of no linked dates, I plead for a different handling. First, an editor should not have to come here, to the discussion page, to find the meaning of the link parameter -- deprecated or not, it should be on the documentation page. Second, you don't need to wait until there's no more use of <code>link=on</code> -- just ignore it in the template code. Some dates that were linked will then come up not linked, but I'm all for that. The documentation page should then describe <code>link=on</code> and <code>link=off</code> as former parameters that have no effect and should be removed when encountered.. . . . <strong>Jim</strong> . . . . [[User:Jameslwoodward|Jameslwoodward]] ([[User talk:Jameslwoodward|talk]] • [[Special:Contributions/Jameslwoodward|contribs]]) 12:56, 22 September 2009 (UTC)
 
:: Okay I readded it. <fontspan facestyle="font-family:Verdana">[[User:Gary King|<span style="color: #02b;">Gary&nbsp;<b>King</b></span>]]&nbsp;([[User talk:Gary King|<span style="color: #02e;">talk</span>]])</fontspan> 16:35, 22 September 2009 (UTC)
 
:::So, Jim, you're suggesting the parameter be mentioned so that people can still make sense of transclusions which still use it. Presumably when there are no longer any such transclusions we can forget about it entirely, right. Note that there are no "<code>link=on</code>"s left. It shouldn't be too hard to eliminate any "<code>link=off</code>"s that might exist. Once there are no "<code>link=</code>"s at all we can safely put the issue to rest since it will only be of historical interest for which mention in talk archives is sufficient. I've changed the doc to better reflect the fact that this is a former parameter which should no longer be used & removed when found. [[User:Jimp|J<small>IM</small>p]]<sub>&nbsp;[[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 17:45, 22 September 2009 (UTC)
Line 207:
:It's a huge problem with sortable tables in general. We can do better than the current implementation (i.e., not using display:none), but it would be a large undertaking. — [[User:RockMFR|RockMFR]] 22:55, 25 September 2009 (UTC)
:: Ooo, ooo! You've got me on the edge of my seat with that tantalizing hint! Please tell us more! How can we do better? [[User:Eubulides|Eubulides]] ([[User talk:Eubulides|talk]]) 23:20, 25 September 2009 (UTC)
::: We can create a custom sort key attribute for rows, then use that to enter sort keys rather than hiding them in CSS. We're already manipulating tables with JavaScript to sort, so this shouldn't be much more work. <fontspan facestyle="font-family:Verdana">[[User:Gary King|<span style="color: #02b;">Gary&nbsp;<b>King</b></span>]]&nbsp;([[User talk:Gary King|<span style="color: #02e;">talk</span>]])</fontspan> 00:40, 26 September 2009 (UTC)
:::: That's much better, thanks. And it doesn't sound like a "large undertaking", except for the conversion of existing pages (which would not have to be done all at once, of course; we could keep the old, buggy templates around for a while). [[User:Eubulides|Eubulides]] ([[User talk:Eubulides|talk]]) 01:30, 26 September 2009 (UTC)
::::Yeah, that's pretty much what I was thinking. So if we wanted to go the attribute route, we would have to:
Line 221:
:Three-letter dates are supported, e.g. {{<code>dts|31 Dec 2000</code>}} → "{{dts|31 Dec 2000}}". [[User:Jimp|J<small>IM</small>p]]<sub>&nbsp;[[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 13:57, 24 September 2009 (UTC)
::Yes, but these involve lots of behind the scenes shenanigans and cannot be deployed in tables more than ~400 times per article before hitting a technical limit. What I have in mind is something more like
<div style="text-align: center;">
{|
|-
Line 228:
| {{tlx|dts|2000|09|31|format{{=}}dmy|months{{=}}3L}} || &rarr; || (31 Sep 2000),
|-
| {{tlx|dts|2000|Sep|31|format{{=}}mdy|months{{=}}AP}} || &rarr; || (Sept. 31, 2000).
|}
</centerdiv>
::[[User:Headbomb|Headbomb]]&nbsp;{<sup>[[User talk:Headbomb|ταλκ]]</sup><sub style="margin-left:-4.0ex;">[[Special:Contributions/Headbomb|κοντριβς]]</sub>&nbsp;&ndash;&nbsp;[[WP:PHYS|WP Physics]]} 15:11, 24 September 2009 (UTC)
 
::: It looks fine to me. I [http://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&oldid=315964281 ran Jim's version a thousand times] and it still works. <fontspan facestyle="font-family:Verdana">[[User:Gary King|<span style="color: #02b;">Gary&nbsp;<b>King</b></span>]]&nbsp;([[User talk:Gary King|<span style="color: #02e;">talk</span>]])</fontspan> 18:22, 24 September 2009 (UTC)
::::See [http://en.wikipedia.org/w/index.php?title=List_of_Super_Proton_Synchrotron_experiments&oldid=315820424#WA_experiments]
 
:Is that a mistake? You've got <code>format=dmy</code> giving ymd. Has it yet been settled that we'll be using AP in tables (or at all)? [[User:Jimp|J<small>IM</small>p]]<sub>&nbsp;[[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 19:44, 24 September 2009 (UTC)
:: No, he just hardcoded the text, that's why it's in YMD format; check the source code of his post. <fontspan facestyle="font-family:Verdana">[[User:Gary King|<span style="color: #02b;">Gary&nbsp;<b>King</b></span>]]&nbsp;([[User talk:Gary King|<span style="color: #02e;">talk</span>]])</fontspan> 19:48, 24 September 2009 (UTC)
::: Yeah but it seems to imply that this'll be the output when you use <code>format=dmy</code> when it should be "31 Sep 2000". [[User:Jimp|J<small>IM</small>p]]<sub>&nbsp;[[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 20:57, 24 September 2009 (UTC)
:::: Mistake from my part, I've fixed it now. [[User:Headbomb|Headbomb]]&nbsp;{<sup>[[User talk:Headbomb|ταλκ]]</sup><sub style="margin-left:-4.0ex;">[[Special:Contributions/Headbomb|κοντριβς]]</sub>&nbsp;&ndash;&nbsp;[[WP:PHYS|WP Physics]]} 21:06, 24 September 2009 (UTC)
Line 246:
 
[[List of Kansas City Royals managers]] has a sort bug in the last column, labeled "WS". Can anybody figure it out? I know that this doesn't strictly concern {{tl|dts}}, but this talk page is frequented by more editors so I thought I might as well give it a shot. [[User:Dabomb87|Dabomb87]] ([[User talk:Dabomb87|talk]]) 00:06, 29 September 2009 (UTC)
: There's probably something wrong with the {{bcode|ts_resortTable()}} JavaScript function used to sort tables, because if you change the {{bcode|1=colspan}} in the bottom row to "2", then add another column in that row, then WS sorts fine. So it appears to be a bug in the sorting function. <fontspan facestyle="font-family:Verdana">[[User:Gary King|<span style="color: #02b;">Gary&nbsp;<b>King</b></span>]]&nbsp;([[User talk:Gary King|<span style="color: #02e;">talk</span>]])</fontspan> 00:39, 29 September 2009 (UTC)
::Thanks, I have worked around that bug now. [[User:Dabomb87|Dabomb87]] ([[User talk:Dabomb87|talk]]) 00:45, 29 September 2009 (UTC)
 
Line 256:
The template is not showing up in the [[List of WWE Tag Team Champions]] (under the date column) for me (and I asked on IRC, and it's not showing for other users as well and I tried both IE and Firefox). I checked the history, and I couldn't find a time when it did work, so it must be something in the template. What makes this weird is that it works perfectly on this page: [[List of World Tag Team Champions (WWE)]]. Does anyone have any ideas as to what is going on? -- [[User:Scorpion0422|<span style="color:#FF8C00;">Scorpion</span>]][[user talk:Scorpion0422|<sup style="color:black;">0422</sup>]] 20:23, 23 December 2009 (UTC)
:The same issue came up on [[Avatar (2009 film)]]. I just switched it to {{tl|Start date}}. [[User:Bovineboy2008|<small>BOVINEBOY</small>]][[User talk:Bovineboy2008|'''2008''']] [[Special:Contributions/Bovineboy2008|:)]] 20:55, 23 December 2009 (UTC)
:: {{wfm}} <fontspan facestyle="font-family:Verdana">[[User:Gary King|<span style="color: #02b;">Gary&nbsp;<b>King</b></span>]]&nbsp;([[User talk:Gary King|<span style="color: #02e;">talk</span>]])</fontspan> 19:11, 27 December 2009 (UTC)
 
== simpler way? ==
Line 263:
: <code><nowiki>{{nk|{{date|{{{1}}}|iso}}|{{date|{{{1}}}}}}}</nowiki></code>
~ [[User:10nitro|10nitro]] ([[User talk:10nitro|talk]]) 20:15, 3 January 2010 (UTC)
: Yeah, with a little tweaking it can be done. <fontspan facestyle="font-family:Verdana">[[User:Gary King|<span style="color: #02b;">Gary&nbsp;<b>King</b></span>]]&nbsp;([[User talk:Gary King|<span style="color: #02e;">talk</span>]])</fontspan> 05:23, 4 January 2010 (UTC)
 
== Difference? ==
 
What is the difference between this template and {{tl|Start date}}? [[User:Erik|Erik]] ([[User talk:Erik|talk]]) 22:33, 10 March 2010 (UTC)
: This template is used to enter dates into tables so that they are sortable. <fontspan facestyle="font-family:Verdana">[[User:Gary King|<span style="color: #02b;">Gary&nbsp;<b>King</b></span>]]&nbsp;([[User talk:Gary King|<span style="color: #02e;">talk</span>]])</fontspan> 22:36, 10 March 2010 (UTC)
::Which should be used in the "released" field of a film's infobox, then? The infobox documentation mentions only "Start date". [[User:Erik|Erik]] ([[User talk:Erik|talk]]) 22:39, 10 March 2010 (UTC)
::: {{tl|start date}}, not this one. <fontspan facestyle="font-family:Verdana">[[User:Gary King|<span style="color: #02b;">Gary&nbsp;<b>King</b></span>]]&nbsp;([[User talk:Gary King|<span style="color: #02e;">talk</span>]])</fontspan> 22:46, 10 March 2010 (UTC)
::::Thanks. I didn't want to continue without knowing for sure. Happy editing! [[User:Erik|Erik]] ([[User talk:Erik|talk]]) 22:52, 10 March 2010 (UTC)
 
Line 495:
== Y10K support? ==
 
I noticed <strikes>from</strikes> the [[:Template:Dts#Examples|examples]] in documentation have years starting with 0, from which I inferred support for display of the [[Year 10,000 problem|year 10,000]] and beyound. Is this true? -[[User:Mardus|Mardus]] ([[User talk:Mardus|talk]]) 02:11, 27 October 2013 (UTC)
 
== "What it solves" section does not fully conform to MOS:DATE ==
Line 587:
 
Would it be feasible without too much hassle to support quarter notation such as "Q1, 2017"? They should be sorted right after the last month of the quarter, e.g. after March 2017 for Q1, after June for Q2, etc. Also the notation for half-years "H1, 2017" is sometimes useful for government documents or future planned events with only a vague announced time range. — [[User:JFG|JFG]] <sup>[[User talk:JFG|talk]]</sup> 18:40, 5 November 2016 (UTC)
:I'm in support of this idea. The new game list articles frequently come with quarter dates. [[Template:DTBA]] was created to support and sort quarters but it would be better it was merged into this template. <span style="text-shadow: 0px 0px 2px #58f;">[[User:Rukario-sama|<span style="color:#58f;">Rukario</span><fontspan colorstyle="color: #555">-sama</fontspan>]]</span> <span style="text-shadow: 0px 0px 2px #555;">[[User talk:Rukario-sama|<fontspan colorstyle="color: #555">^ㅈ^ -(...)</fontspan>]]</span> 21:45, 29 January 2017 (UTC)
 
== Adding wikiLinks? ==
Line 624:
I *think* that what needs to be added to the code is the following. After line 408 in [[Module:Dts]] where is says
 
<codepre>
if self.format == 'hide' then
return ''
end
</codepre>
I think adding an
<codepre>
if self.display then
return self.display
end
</codepre>
Not sure if the self.display test should simply be for existance or if it needs a <nowiki><> ''</nowiki>. Don't know the language well enough (but I program for a living)[[User:Naraht|Naraht]] ([[User talk:Naraht|talk]]) 17:11, 19 February 2018 (UTC)
:[[Module:Dts]] was last edited in July 2015. Mr. Stradivarius has put proposed changes in [[Module:Dts/sandbox]] which can be tested using {{tl|dts/sandbox}}.