Content deleted Content added
m Archiving 1 discussion(s) from Template talk:Dts) (bot |
m Fixed Lint errors on this page (html5 obsolete "font" tags replaced for "span style") |
||
(16 intermediate revisions by 6 users not shown) | |||
Line 12:
==Possible bugs==
My [[Special:Preferences]] have the date presentation set to "2001-01-15T16:12:34". Yet when template is passed '''<code><nowiki>{{
:I fixed it, it was due to a blank space in the year link: <nowiki>[[12 April]] [[2007 ]]</nowiki> gives [[12 April]] [[2007 ]].--[[User:Patrick|Patrick]] 07:25, 12 April 2007 (UTC)
Line 33:
Based on recent changes to date formats (in particular, date autoformatting) in the [[Wikipedia:Manual of Style]] for dates, I would like to suggest that "link=off" should be the default setting so that dates are not automatically linked when not specifying a parameter (likely to be the most common usage). If editors wish to link dates, they can set "link=on". [[User:Truthanado|Truthanado]] ([[User talk:Truthanado|talk]]) 00:15, 15 September 2008 (UTC)
: A lot of people who use this template might then wonder why the links are now off; they might think something is broken, perhaps. <
::That kind of confusion is already happening with the major change in the way dates are handled now. In the interest of moving forward to a consistent system, maybe that's an acceptable "bump in the road". [[User:Truthanado|Truthanado]] ([[User talk:Truthanado|talk]]) 11:32, 15 September 2008 (UTC)
::: I don't mind; I created that feature in this template and would like to see the default as unlinked. But of course, I'm always a fan of consensus, too :) <
:::: I think if the policy is to have unlinked dates, then the template ought to be made to be consistent with that policy. It is true that some people might think the template is broken, but then that should hopefully lead them to discover the change in policy, which would be a good thing in the long run! [[User:Mrh30|Mrh30]] ([[User talk:Mrh30|talk]]) 09:27, 10 October 2008 (UTC)
You can set the default to be 'link=off' because all articles now use it for dts (and for the now deprecated dts2 template). The default will be useful for new uses. [[User:Lightmouse|Lightmouse]] ([[User talk:Lightmouse|talk]]) 13:30, 25 October 2008 (UTC)
: Done <
Thanks. [[User:Lightmouse|Lightmouse]] ([[User talk:Lightmouse|talk]]) 17:37, 26 October 2008 (UTC)
Line 49:
I thought I had already asked this question, but apparently not. :) Is it possible to make this template display a date without the year, i.e. just day and month? [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 23:16, 23 October 2008 (UTC)
: No, not with its current setup. <
::What I mean is, is it feasible to make this change to the template? [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 00:42, 24 October 2008 (UTC)
::: This feature was not implemented probably because it wasn't requested that often. It can be done, though. In which article it is needed? <
::::I've been using it in articles such as [[List of South Korean films of 2006]], where repeating the years seems rather redundant and takes up space. [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 13:39, 25 October 2008 (UTC)
::::: Okay done. <code><nowiki>{{dts||10|25}}</nowiki></code> will show as {{dts||10|25}}; it will be sorted along with other dates that ''do'' have years, and it's year will be considered as whatever the current year is (so in this case, it would be sorted as <code>2008-10-25</code>). <
::::::Many thanks! [[User:PC78|PC78]] ([[User talk:PC78|talk]]) 13:21, 26 October 2008 (UTC)
== Approximate dates ==
Is it possible to use this table with approximate dates? I'm thinking of dates in the format "c.", "before", "after", "16/17 November" etc. The question relates to [[List of the titled nobility of England and Ireland 1300–1309]] which is currently nominated for FL, where it has been suggested that a sortable list be used. I've found this problematic with so many approximate dates. [[User:Lampman|Lampman]] ([[User talk:Lampman|talk]]) 13:24, 21 February 2009 (UTC)
: That's not possible with the current code. Regarding implementing it, I think it'd be easier to write custom code for the specific article rather than rewriting this template. Just use {{tl|sort}} to do what you want; the first parameter is for sorting, the second is for what you actually want to appear. <
==Retrofit talk-page year headers==
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
:::{<nowiki/>{dts/ver|v=yes |2009|78|55}} <--verify to report 78 & 55.
When a user sets "v=yes" then problems will display on the page:
:: <br><
:: <br><
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 87:
be better? [[User:GregorB|GregorB]] ([[User talk:GregorB|talk]]) 19:29, 15 April 2009 (UTC)
: The template can be forced to nowrap by default if people think that makes more sense. There might be some fringe cases where that is unhelpful, though, like in a table where the columns are very narrow. <
::Nowrap may well be the default but - as you've noted - this could cause problems (but to what extent, it's hard to say). What I had in mind is to add the nowrap option, but make it default to "off" so as to be on the safe side by not changing the behavior of existing transclusions. This could be the initial setup, at any rate. [[User:GregorB|GregorB]] ([[User talk:GregorB|talk]]) 06:52, 16 April 2009 (UTC)
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. <
:::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> [[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. <
:::: 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> [[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}} || → || (31 Sep 2000),
|-
| {{tlx|dts|2000|Sep|31|format{{=}}mdy|months{{=}}AP}}
|}
</
::[[User:Headbomb|Headbomb]] {<sup>[[User talk:Headbomb|ταλκ]]</sup><sub style="margin-left:-4.0ex;">[[Special:Contributions/Headbomb|κοντριβς]]</sub> – [[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. <
::::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> [[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. <
::: 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> [[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]] {<sup>[[User talk:Headbomb|ταλκ]]</sup><sub style="margin-left:-4.0ex;">[[Special:Contributions/Headbomb|κοντριβς]]</sub> – [[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. <
::Thanks, I have worked around that bug now. [[User:Dabomb87|Dabomb87]] ([[User talk:Dabomb87|talk]]) 00:45, 29 September 2009 (UTC)
Line 254:
==Template not working in certain pages==
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|<
: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}} <
== 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. <
== 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. <
::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. <
::::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 287:
:It can do {{dts|October 2005}}. [[User:Jimp|J<small>IM</small>p]]<sub> [[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 10:38, 9 January 2011 (UTC)
::When I enter a code <code><nowiki>{{dts|format=y|1992|2|7}}</nowiki></code> it doesn't format the output properly. Can you update "format" values to display onyl the year-value ? -Paul
::: <code><nowiki>{{dts|1992}}</nowiki></code> (output: {{dts|1992}}) will do what you want, to display only the year. <
== Time interval ==
Is it possible to enter a time interval such as January 11–15 and have it sort by the first (or last) date, i.e. as "January 11" or "January 15"? [[User:Bamse|bamse]] ([[User talk:Bamse|talk]]) 20:20, 26 February 2011 (UTC)
: The template doesn't do this at the moment. For now, you can use {{tl|sort}}. <
::Thanks for the reply. I went with {{tl|dtsh}} and typing the interval after it (without template). [[User:Bamse|bamse]] ([[User talk:Bamse|talk]]) 08:14, 27 February 2011 (UTC)
::I suppose that "dtsh" and "dts" add the same kind of hidden sort code, correct? [[User:Bamse|bamse]] ([[User talk:Bamse|talk]]) 08:15, 27 February 2011 (UTC)
::: Yep <
== Conflict with Skype ==
Please see [[Wikipedia:Village pump (technical)#Skype problem - processesing "invisible" text]]. Thanks, [[User:Rambo's Revenge|<b
== International dating ==
Wouldn't it be more appropriate to have the default format as international dating rather than American dating? Is this determined by the template or is it entirely based on user preferences? '''[[User:Mclay1|<span style="color:red">McLerristarr</span>]] | [[User talk:Mclay1|<span style="color:blue">Mclay1</span>]]''' 02:28, 28 June 2011 (UTC)
: Template default is MDY. There is an option to change it to DMY. <
::Hence my first question. '''[[User:Mclay1|<span style="color:red">McLerristarr</span>]] | [[User talk:Mclay1|<span style="color:blue">Mclay1</span>]]''' 02:49, 28 June 2011 (UTC)
::: Not sure whether it's more appropriate. A related question would be whether it's worth changing it and then going through every article that transcludes this template to ensure that they are using the correct format, since by now most people using this template assume that it outputs in MDY. <
== text browsers ==
Line 358:
:The alterations seem great, nice work. However, I'm not entirely convinced that the month names need to abbreviated by default. While I see your point about the issue of space, I personally worry whether reducing all month names to just three letters would suggest a lack of professionalism that, as an encyclopaedia, we need to avoid. It makes sense for an editor to have the option to abbreviate the month names, but could this not be achieved through an optional parameter? [[User:A Thousand Doors|A Thousand Doors]] ([[User talk:A Thousand Doors|talk]] | [[Special:Contributions/A Thousand Doors|contribs]]) 01:25, 28 April 2012 (UTC)
::Abbreviating month names by default is an absolutely horrible idea. Like the user above, I agree that is looks unprofessional, and would be better installed as an optional parameter, rather than the default output. <
:::In addition, the changed code has caused a complete breakdown in some tables, such as those listed at [[List of Presidents of Israel by longevity]], which looked fine under the previous version. <
::::It appears that this has caused a breakdown across many of our FLs, I'm not sure what the fix is, but check [[List of international cricket five-wicket hauls by Anil Kumble]] for one example (many of the FLs in the category have the same problem). —[[User:SpacemanSpiff|<
:::::The new template seems to force a new line after it, so that where a date is immediately followed by a reference or comment, the reference/comment is now below the date - making tables longer and scruffier. See Costa Rica and Albania in [[International recognition of Kosovo#UN member states]] for example. [[User:Bazonka|Bazonka]] ([[User talk:Bazonka|talk]]) 07:47, 28 April 2012 (UTC)
::::::I would just like to see the month abbreviations set as an optional parameter, as I think the abbreviations look ugly as a default. <
:::::::The abbreviations stink. How can one guy just go and change it without first trying to reach a consensus among users?[[User:TheFBH|TheFBH]] ([[User talk:TheFBH|talk]]) 21:01, 28 April 2012 (UTC)
::::::::As this template is used on over 10,000 articles consensus should be gained before changing the functionality for existing pages. Please gain consensus or change to operate as the previous version. [[User:Keith D|Keith D]] ([[User talk:Keith D|talk]]) 15:25, 29 April 2012 (UTC)
Line 389:
}}
The month is misspelled in the second example. This results in an error, but it is hidden when it runs through {{tl|dts/out}}. ---'''''— [[User:Gadget850|<span style="color:gray">Gadget850 (Ed)</span>]]<span style="color:darkblue"> </span>'''''
:I'll see what can be done to check for invalid input. [[User:Jimp|J<small>IM</small>p]]<sub> [[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 00:31, 1 May 2012 (UTC)
Line 397:
:::Which suppresses the error entirely, even with an invalid date. --[[Special:Contributions/68.57.153.79|68.57.153.79]] ([[User talk:68.57.153.79|talk]]) 19:07, 1 May 2012 (UTC)
::::Yes. I would have expected a visible error message. ---'''''— [[User:Gadget850|<span style="color:gray">Gadget850 (Ed)</span>]]<span style="color:darkblue"> </span>'''''
:::::Yes, a visible error message would be best in the long run; however, we don't yet know how many pages are misusing the template. Before we go putting up error messages I thought it might be best to fix up those pages already using an invalid date. So far [http://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:Dts/no_date what links here] has picked up about a couple of dozen articles with invalid dates. [[User:Jimp|J<small>IM</small>p]]<sub> [[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 23:13, 1 May 2012 (UTC)
::::::Pages with #time errors will eventually be placed in [[:Category:Pages with parser function time errors]]. Before, you could see a page in the category, and if the error was hidden, you could find it in the rendered HTML and match it to the markup. Now you can't do that. For example, [[Italian record progression 50 metres freestyle]] is in the links here, but you will have to check every instance of the template for an error. ---'''''— [[User:Gadget850|<span style="color:gray">Gadget850 (Ed)</span>]]<span style="color:darkblue"> </span>'''''
:::::::I have cleaned up all the invalid inputs in the main space. There weren't as many as I thought there might have been. The template is now giving a very obvious error message. [[User:Jimp|J<small>IM</small>p]]<sub> [[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 11:01, 2 May 2012 (UTC)
Line 495:
== Y10K support? ==
I noticed <
== "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|<
== Adding wikiLinks? ==
This template needs to implement wiki links. like <pre>{{
== Smarter nowrap=off / wrap=year ==
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
<
if self.format == 'hide' then
return ''
end
</
I think adding an
<
if self.display then
return self.display
end
</
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}}.
{{#invoke:convert/tester|compare|dts}}
:[[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 23:42, 19 February 2018 (UTC)
== Module:Date ==
@[[User:Mr. Stradivarius|Mr. Stradivarius]]: FYI, I have been slowly developing some age/date modules which work from 9999 BCE to 9999 CE. For example, {{tl|extract}} can handle the current proposal [[#Compatibility with Manual of Style|above]] over that more limited range of years. It accepts dates in a variety of formats so <code>1945-05-27</code> and <code>1945|05|27</code> would work as well.
*<code><nowiki>{{extract|27 May 1945|show=May 27–28|sortable=on}}</nowiki></code> → {{extract|27 May 1945|show=May 27–28|sortable=on}}
I think you should make your change to dts and that it should continue to be used. I am mentioning the alternative only to make you aware that I hope to replace many of the age and date templates which have minor quirks and inconsistencies. I don't think there would be any benefit from replacing dts which is useful for its ability to handle very large years.
[[Module:Age]] and [[Module:Date]] do the work. The latter can produce a sort key based on the [[Julian day]] which allows accurate sorting of dates and times. The sort key increments by 1 for each day, and by fractional amounts if a time-of-day is specified, for example 6:00 am gives 0.25. It works from 9999 BCE to 9999 CE (dates before Julian day number 0 are regarded as negative and sort correctly). [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 00:24, 20 February 2018 (UTC)
|