Line 28: | Line 28: | ||
::{{ping|Mr. Stradivarius}} Sorry for not being more clear. I'm not referring to the output formats, but rather the acceptable input formats. I'm looking at the second column of the table at [[template:dts/doc#dates]], where there is a bulleted list showing the date formats that are accepted for input. —[[User:Salton Finneger|Salton Finneger]] ([[User talk:Salton Finneger|talk]]) 17:41, 5 July 2016 (UTC) |
::{{ping|Mr. Stradivarius}} Sorry for not being more clear. I'm not referring to the output formats, but rather the acceptable input formats. I'm looking at the second column of the table at [[template:dts/doc#dates]], where there is a bulleted list showing the date formats that are accepted for input. —[[User:Salton Finneger|Salton Finneger]] ([[User talk:Salton Finneger|talk]]) 17:41, 5 July 2016 (UTC) |
||
:::{{ping|Salton Finneger}} Ah, I see. That will actually be interpreted as DMY, not MDY. You can check that by going to [[Special:ExpandTemplates]] and entering <code><nowiki>{{dts|5/7/2016}}</nowiki></code> - it will give you <code><nowiki><span class="sortkey" style="display:none;speak:none">000000002016-07-05-0000</span><span style="white-space:nowrap">5 July 2016</span></nowiki></code>. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 23:27, 5 July 2016 (UTC) |
:::{{ping|Salton Finneger}} Ah, I see. That will actually be interpreted as DMY, not MDY. You can check that by going to [[Special:ExpandTemplates]] and entering <code><nowiki>{{dts|5/7/2016}}</nowiki></code> - it will give you <code><nowiki><span class="sortkey" style="display:none;speak:none">000000002016-07-05-0000</span><span style="white-space:nowrap">5 July 2016</span></nowiki></code>. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 23:27, 5 July 2016 (UTC) |
||
::::I'd say it's best not to mention this in the doc though. XX/XX/XXXX format is ambiguous |
::::I'd say it's best not to mention this in the doc though. XX/XX/XXXX format is ambiguous. Even though it'd only be in the source code, it'd be better not to encourage it. [[User talk:Jimp|Jimp]] 02:02, 6 July 2016 (UTC) |
Revision as of 02:03, 6 July 2016
Replacing Dtsh?
I used the DTSH template on tables of fraternity installation dates in sortable tables when the only information available was season, so if I had three fraternity installations as February 1, 1940, Spring 1940 and May 13, 1940, I'd do them as {{dts|1940|2|1}}, {{dtsh|1940|4|1}}Spring 1940, and {{dts|1940|5|13}} how can I do this without dtsh?Naraht (talk) 00:47, 23 February 2015 (UTC)
- It's been replaced by
|format=hidden
. Jimp 11:56, 19 March 2015 (UTC)
Sorting with range of dates
Is it possible somehow to sort with a date range? For example, I have a list of events with the following dates "June 22 - July 3, 1956", "September 20 - October 5, 1946" and "August 1-20, 1934". --Gonnym (talk) 12:53, 14 June 2015 (UTC)
- @Gonnym: There is a manual workaround. Enter the first date of the range in the template, use
|format=hide
, and then display the date range manually. You may also want to prevent your dates from wrapping by using {{nowrap}}. For example,{{dts|1956|6|22|format=hide}}{{nowrap|June 22 - July 3, 1956}}
will give you "June 22 - July 3, 1956". — Mr. Stradivarius ♪ talk ♪ 04:23, 4 July 2015 (UTC)- A very much belated thank you for your assistance Mr. Stradivarius. --Gonnym (talk) 17:31, 10 August 2015 (UTC)
- Thank's a lot for this. My workaround was to use the generated sort key like
|data-sort-value=000000002015-10-29-0000 |October 29–31, 2015
which wasn't pretty or scalable at all. Opencooper (talk) 17:42, 1 October 2015 (UTC)
Available formats
This may not be especially relevant, since automatic support of dates in table sorts has made this template a lot less necessary, but note that at Template:Dts/doc#Parameters, the list of format options is incomplete—the template also supports MDY to display dates in the 6/13/2024 format. —Salton Finneger (talk) 14:11, 1 July 2016 (UTC)
- @Salton Finneger: I'm not quite sure what you mean -
|format=mdy
is one of the options listed at Template:Dts/doc#Formatting, but it results in something like June 13, 2024, not 6/13/2024. Could you clarify? Best — Mr. Stradivarius ♪ talk ♪ 13:08, 5 July 2016 (UTC)- @Mr. Stradivarius: Sorry for not being more clear. I'm not referring to the output formats, but rather the acceptable input formats. I'm looking at the second column of the table at template:dts/doc#dates, where there is a bulleted list showing the date formats that are accepted for input. —Salton Finneger (talk) 17:41, 5 July 2016 (UTC)
- @Salton Finneger: Ah, I see. That will actually be interpreted as DMY, not MDY. You can check that by going to Special:ExpandTemplates and entering
{{dts|5/7/2016}}
- it will give you<span class="sortkey" style="display:none;speak:none">000000002016-07-05-0000</span><span style="white-space:nowrap">5 July 2016</span>
. — Mr. Stradivarius ♪ talk ♪ 23:27, 5 July 2016 (UTC)- I'd say it's best not to mention this in the doc though. XX/XX/XXXX format is ambiguous. Even though it'd only be in the source code, it'd be better not to encourage it. Jimp 02:02, 6 July 2016 (UTC)
- @Salton Finneger: Ah, I see. That will actually be interpreted as DMY, not MDY. You can check that by going to Special:ExpandTemplates and entering
- @Mr. Stradivarius: Sorry for not being more clear. I'm not referring to the output formats, but rather the acceptable input formats. I'm looking at the second column of the table at template:dts/doc#dates, where there is a bulleted list showing the date formats that are accepted for input. —Salton Finneger (talk) 17:41, 5 July 2016 (UTC)