Cannabis Ruderalis

Content deleted Content added
Lowercase sigmabot III (talk | contribs)
m Archiving 1 discussion(s) to Template talk:Dts/Archive 1) (bot
→‎Day of the week: new section
Line 166: Line 166:
Can we nominate these subpages for deletion? Is there any reason to preserve them for historical reference? I'll check each one for incoming links and transclusions before nominating, unless someone here wants to take on the TFD work. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 20:33, 26 February 2019 (UTC)
Can we nominate these subpages for deletion? Is there any reason to preserve them for historical reference? I'll check each one for incoming links and transclusions before nominating, unless someone here wants to take on the TFD work. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 20:33, 26 February 2019 (UTC)
: The more urgent problem is that this template is being used in many places where it isn't necessary. [[User:Pppery|{{3x|p}}ery]] ([[User talk:Pppery|talk]]) 23:22, 26 February 2019 (UTC)
: The more urgent problem is that this template is being used in many places where it isn't necessary. [[User:Pppery|{{3x|p}}ery]] ([[User talk:Pppery|talk]]) 23:22, 26 February 2019 (UTC)

== Day of the week ==

Is there an easy way to get output to automatically determined and include the day of the week? [[User:NewsAndEventsGuy|NewsAndEventsGuy]] ([[User talk:NewsAndEventsGuy|talk]]) 15:28, 16 March 2019 (UTC)

Revision as of 15:28, 16 March 2019

Compatibility with Manual of Style

Wikipedia:Manual of Style/Dates and numbers#Other date ranges MOS:DOB informs that simple day–day ranges which use an unspaced en dash are perfectly acceptable (sample):

  • 5–7 January 1979; January 5–7, 1979; elections were held March 5–8

Help:Sorting#Day and month gives examples of Dts templates working just fine for one day of the month.

Date
(Day and month)
4 Jan
28 Aug
3 Jan
29 Aug
14 Dec
1 Jan
Date
(Month and day)
January 4
August 28
January 3
August 29
December 14
January 1

However, the ranges (which are recommended by MOS:DOB as perfectly fine), are being rejected by the Dts template en masse. Please fix this if you know how, in order to make the Dts template compatible with our Manual of Style. Thank you. Poeticbent talk 15:02, 16 February 2018 (UTC)[reply]

Date
(Day and month)
Error in Template:Date table sorting: '4–5 Jan' is an invalid date
Error in Template:Date table sorting: '28–29 Aug' is an invalid date
Error in Template:Date table sorting: '3–4 Jan' is an invalid date
Error in Template:Date table sorting: '29–30 Aug' is an invalid date
Error in Template:Date table sorting: '14–15 Dec' is an invalid date
Error in Template:Date table sorting: '1–2 Jan' is an invalid date
Date
(Month and day)
Error in Template:Date table sorting: 'January 4–5' is an invalid date
Error in Template:Date table sorting: 'August 28–29' is an invalid date
Error in Template:Date table sorting: 'January 3–4' is an invalid date
Error in Template:Date table sorting: 'August 29–30' is an invalid date
Error in Template:Date table sorting: 'December 14–15' is an invalid date
Error in Template:Date table sorting: 'January 1–2' is an invalid date

It says that they are acceptable for use in articles, but DTS isn't capable of using them in sorts. It would make the logic of figuring out the year, month and day for the purposes of generating a sort string much more difficult. Basically what dts does is takes a variety of formats and figure out the year, month and day from them and uses that to build a long invisible number which allows for consistent sorting. So for example, you can have "2002-02-27" and "26 Jun 1988" in the same list and it will make it so that the second will properly sort before the first. Template:Dts/doc shows all the formats that it does handle. The additional logic to properly handle "January 4-5, 1998", "January 4-February 1, 1998", "4-12 January 1998" "4 January - 1 February 1998" (all of which should sort to the same value" and others would be a significant expansion of the code. Given its use in over 20,000 pages, I think it would take a *lot* of testing as well before release.Naraht (talk) 19:31, 16 February 2018 (UTC)[reply]

Additionally, the question become whether every other form should be handled by DTS including circa, after and before...Naraht (talk) 19:33, 16 February 2018 (UTC)[reply]

  • Thanks for letting me know about the the DTS handling capabilities, Naraht. Needless to say, the difficulties which you described above do not change the fact that the DTS template – as it stands – is not compatible with the MOS:DOB policy, and the policy does not even inform about that incompatibility, making people like me wonder whether the fault in formatting was ours alone, and thus only wasting time trying to correct ourselves, before giving up on it. Poeticbent talk 20:20, 16 February 2018 (UTC)[reply]

{{dts}} works with a single date. Why would you expect it to handle a range of dates? If there are several articles that need such a feature it might be reasonable to make a new template for that specific purpose. I like simple names and Template:dts2 might be good. I see that page was deleted per TfD. It would not be straightforward because the examples here are like "January 4–5" but could be much trickier, such as "1 Feb 2011 to 5 March 2015". Johnuniq (talk) 23:01, 16 February 2018 (UTC)[reply]

The "code" for dts is at Module:Dts. If anyone has suggestions on upgrading it to handle date ranges, so that it sorts on the first day in the range, I'd love to take a look. It appears that the primary editor (though no edits since 2015) for the template is Mr. Stradivarius, but as I indicated, the testing would be significant.Naraht (talk) 01:01, 17 February 2018 (UTC)[reply]
Please start by linking to a couple of articles where this would be useful. Then produce a comprehensive set of examples that should work. Above we see "4–5 Jan" and "January 4–5". Should hyphens instead of en dashes be accepted? What about "to"? What other forms of input should be accepted? There is no need for an elaborate table—just a simple list showing the date range only. Johnuniq (talk) 08:04, 17 February 2018 (UTC)[reply]
If you want an example, the one specific article which prompted me to come here was the Anti-communist_resistance_in_Poland_(1944–1946)#List_of_attacks_on_Communist_prisons,_camps_and_state_security_offices. My intention was to make the sortable-table column about the months of the attacks produce a sensible result: January, February, March ... down to the New Years Eve of the last day of December. Thanks, Poeticbent talk 14:55, 18 February 2018 (UTC)[reply]
Hi all. The traditional way to make this kind of thing work is to use {{dts|1945|11|22|hide=yes}}November 22–23 {{dts|1945|11|22|format=hide}}November 22–23. The template part of that produces the hidden sort code only, which makes it sort correctly, and then the only part you see is the text outside of the template invocation.

While this words, it is a little inelegant. I was thinking that it might be neater to change the module to allow a |display= parameter, so that you could do something like {{dts|1945|11|22|display=November 22–23}} instead. Does that sound like a reasonable suggestion? — Mr. Stradivarius ♪ talk ♪ 11:05, 19 February 2018 (UTC)[reply]

I think that the original discussion got off track with how to interpret complex examples, and I think that simply having it not do so is probably the right answer. I've used the hidden trick myself for including things like Fall and Spring in fraternity founding listings. I support the addition of a display parameter with the idea that whatever is in display is the entire display. (Having said that, I think the example article should be changed so that the year is part of the same column). I think that the hide parameter should be kept, simply because trying to change everything that uses hide to instead use display seems like a monster task even for a bot, but I think that can be kicked down the road slightly. — Preceding unsigned comment added by Naraht (talk • contribs) 14:39, 19 February 2018 (UTC)[reply]
I definitely support change of the module to allow a |display= parameter. The example of "{{dts|1945|11|22|hide=yes}}November 22–23" looks like someone is just trying too hard to do, what's impossible. The actual year column has nothing to do with it. Please, do it, if you know how. Thanks, Poeticbent talk 15:07, 19 February 2018 (UTC)[reply]
Oops, I just realised that the current parameter is |format=hide, not |hide=yes. I've fixed my example above. — Mr. Stradivarius ♪ talk ♪ 16:19, 19 February 2018 (UTC)[reply]
Poeticbent Since the dates in question for that article range over 1944, 1945 and 1946, once a clear way to change the Month/day column is worked out, I think it does make sense to combine (especially since a sort which simply sorts by year will not be useful), but I'll start that discussion on the article talk page *after* the display parameter is available. — Preceding unsigned comment added by Naraht (talk • contribs) 17:01, 19 February 2018 (UTC)[reply]
Makes sense to me. Poeticbent talk 17:44, 19 February 2018 (UTC)[reply]
@Poeticbent and Naraht: I've added the |display= parameter to the module sandbox. If you want to test it out, you can do so with {{dts/sandbox}}. Let me know if you spot anything strange. Best — Mr. Stradivarius ♪ talk ♪ 17:08, 19 February 2018 (UTC)[reply]
Please try again. We are almost there. {{dts|1945|05|27|display=May 27–28}} does not stop at the month and just one single day in display, but also, automatically adds the year to it, which looks like this: May 27, 1945 (no range given). Also, could you add |hide=yes as a valid alternative to |format=hide. Thanks, Poeticbent talk 17:35, 19 February 2018 (UTC)[reply]
@Poeticbent: The main template isn't updated yet, just the sandbox, so for now you need to use {{dts/sandbox|1945|05|27|display=May 27–28}}. As for |hide=yes, I'm not so sure - I think it complicates the code for no real benefit. — Mr. Stradivarius ♪ talk ♪ 22:55, 19 February 2018 (UTC)[reply]
@Mr. Stradivarius: Any chance this template will get updated with the |display= functionality? - PaulT+/C 17:20, 30 March 2018 (UTC)[reply]

Documentation

Looking at Template:Dts/doc there are tables which all have empty "hidden sort key" columns. So then why is that column there? Is it for addkey or is it for the value of span attribute data-sort-value as seen here: view-source:https://en.wikipedia.org/w/index.php?title=User:User123o987name/sandbox&oldid=876188630? I think it's for the former, but if it is for the latter then values will be difficult to add considering how convoluted things are. --User123o987name (talk) 19:09, 31 December 2018 (UTC)[reply]

Can the subpages be deleted now that a module is being used?

It appears that most or all of the subpages of this template are no longer used, now that it has been converted to a module. Here's a list of the subpages:

Can we nominate these subpages for deletion? Is there any reason to preserve them for historical reference? I'll check each one for incoming links and transclusions before nominating, unless someone here wants to take on the TFD work. – Jonesey95 (talk) 20:33, 26 February 2019 (UTC)[reply]

The more urgent problem is that this template is being used in many places where it isn't necessary. {{3x|p}}ery (talk) 23:22, 26 February 2019 (UTC)[reply]

Day of the week

Is there an easy way to get output to automatically determined and include the day of the week? NewsAndEventsGuy (talk) 15:28, 16 March 2019 (UTC)[reply]

Leave a Reply