Cannabis Ruderalis

Content deleted Content added
No edit summary
Line 103: Line 103:
I've put the new code in place as mentioned above. Besides fixing the problems mentioned above it also makes the hidden code consistant, gets rid of false dates (e.g. outputting the current day of the month when it wasn't input) and allows dm, md, my, d, m & y formats in addition to mdy & dmy. I believe it'll also allow more transclusions (less code ... looks like more but it's actually less (not calling {{tl|MONTHNAME}}, {{tl|MONTHNUMBER}}, etc.)). [[User:Jimp|J<small>IM</small>p]]<sub>&nbsp;[[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 12:09, 27 April 2012 (UTC)
I've put the new code in place as mentioned above. Besides fixing the problems mentioned above it also makes the hidden code consistant, gets rid of false dates (e.g. outputting the current day of the month when it wasn't input) and allows dm, md, my, d, m & y formats in addition to mdy & dmy. I believe it'll also allow more transclusions (less code ... looks like more but it's actually less (not calling {{tl|MONTHNAME}}, {{tl|MONTHNUMBER}}, etc.)). [[User:Jimp|J<small>IM</small>p]]<sub>&nbsp;[[User talk:Jimp|talk]]·[[Special:Contributions/Jimp|cont]]</sub> 12:09, 27 April 2012 (UTC)
: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]] &#124; [[Special:Contributions/A Thousand Doors|contribs]]) 01:25, 28 April 2012 (UTC)
: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]] &#124; [[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. <font color="red">Canuck</font><small><sup>[[User talk:Canuckian89|89 (converse with me)]]</small></sup> 05:58, 28 April 2012 (UTC)


== hidden Error:Invalid time ==
== hidden Error:Invalid time ==

Revision as of 05:58, 28 April 2012

simpler way?

Wouldn't this accomplish the same thing?

{{nk|{{date|{{{1}}}|iso}}|{{date|{{{1}}}}}}}

~ 10nitro (talk) 20:15, 3 January 2010 (UTC)[reply]

Yeah, with a little tweaking it can be done. Gary King (talk) 05:23, 4 January 2010 (UTC)[reply]

How about "October 2005"

If the template can display just the year "2005", how about displaying month/year? "October 2005". Any way to do that? Also it would have been nice if all the code was in one template for easily reproducing this on another wiki. --Justpassingthrough2 (talk) 17:14, 20 February 2010 (UTC)[reply]

It can do October 2005. JIMp talk·cont 10:38, 9 January 2011 (UTC)[reply]
When I enter a code {{dts|format=y|1992|2|7}} it doesn't format the output properly. Can you update "format" values to display onyl the year-value ? -Paul
{{dts|1992}} (output: 1992) will do what you want, to display only the year. Gary King (talk · scripts) 19:05, 25 February 2011 (UTC)[reply]

Difference?

What is the difference between this template and {{Start date}}? Erik (talk) 22:33, 10 March 2010 (UTC)[reply]

This template is used to enter dates into tables so that they are sortable. Gary King (talk) 22:36, 10 March 2010 (UTC)[reply]
Which should be used in the "released" field of a film's infobox, then? The infobox documentation mentions only "Start date". Erik (talk) 22:39, 10 March 2010 (UTC)[reply]
{{start date}}, not this one. Gary King (talk) 22:46, 10 March 2010 (UTC)[reply]
Thanks. I didn't want to continue without knowing for sure. Happy editing! Erik (talk) 22:52, 10 March 2010 (UTC)[reply]

#time limit

This isn't a problem with {{dts}}, but it may be interesting to other users of {{dts}}: There is apparently a limit to the number of occurrences of #time in a single wiki page. I reported the problem to MediaWiki here: http://www.mediawiki.org/wiki/Help_talk:Extension:ParserFunctions#.23time_limit (click the link for more details). This means large sortable tables (i.e. more than 100 rows) should use the {{dts|yyyy|mm|dd}} format instead of {{dts|yyyy-mm-dd}} format. Johnson487682 (talk) 14:36, 15 June 2010 (UTC)[reply]

Template output?

According to dts documentation, {{dts|2010-07-04}} output should be U.S. "July 4, 2010". But in Wikipedia in culture the output of dts appears to always be yyyy-mm-dd. Is this a bug? --Lexein (talk) 08:52, 9 January 2011 (UTC)[reply]

Fixed. JIMp talk·cont 10:35, 9 January 2011 (UTC)[reply]

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"? bamse (talk) 20:20, 26 February 2011 (UTC)[reply]

The template doesn't do this at the moment. For now, you can use {{sort}}. Gary King (talk · scripts) 05:38, 27 February 2011 (UTC)[reply]
Thanks for the reply. I went with {{dtsh}} and typing the interval after it (without template). bamse (talk) 08:14, 27 February 2011 (UTC)[reply]
I suppose that "dtsh" and "dts" add the same kind of hidden sort code, correct? bamse (talk) 08:15, 27 February 2011 (UTC)[reply]
Yep Gary King (talk · scripts) 19:15, 27 February 2011 (UTC)[reply]

Conflict with Skype

Please see Wikipedia:Village pump (technical)#Skype problem - processesing "invisible" text. Thanks, Rambo's Revenge (talk) 12:10, 27 May 2011 (UTC)[reply]

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? McLerristarr | Mclay1 02:28, 28 June 2011 (UTC)[reply]

Template default is MDY. There is an option to change it to DMY. Gary King (talk · scripts) 02:41, 28 June 2011 (UTC)[reply]
Hence my first question. McLerristarr | Mclay1 02:49, 28 June 2011 (UTC)[reply]
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. Gary King (talk · scripts) 02:54, 28 June 2011 (UTC)[reply]

text browsers

Wikipedia is the first site in the world to create such horrible looking dates in text browsers. Keep your zeros to yourselves. Jidanni (talk) 03:34, 9 July 2011 (UTC)[reply]

They are a side effect of the sorting templates that are needed to aid table sorting at the moment. Soon they will no longer be required (due to a new sorting technology) and then it shouldn't bother you anymore. —TheDJ (talk • contribs) 09:54, 14 July 2011 (UTC)[reply]

Two entries with same date

Is there a way to force one row before the other when they have the same date? The table has two entries defined by {{Dts|2011|06|23}}, but one should still be shown before the other, which currently shows up wrong in old-new order (but correct for new-old order). I tried {{Sort|2011-06-23-[1 and 2]|June 23, 2011}} and without the last dash, but that doesn't seem to work, in fact they don't show up between the other dates, they just show up at the bottom of the page. Anyone have some solution? Thanks. Xeworlebi (talk) 01:29, 30 July 2011 (UTC)[reply]

Possible bug

This may be of interest. {{dts|869-07-09}} produces "July 9, 0869", with a leading zero as seen here. jonkerz 08:55, 24 August 2011 (UTC)[reply]

Two more apparent bugs show up in the List of epidemics—first, the pre-1000 AD date ranges have a space after the en dash ("–"; e.g. "165– 180"). Second, there is no space between the numbers and "BC" (e.g., "1650BC– 1550BC"). I tried to figure out the syntax, but I can't make heads or tails of how to fix those two bugs. Note that these appear in both Firefox 2.0.0.20 and Safari 1.3.2—DocWatson42 (talk) 09:52, 29 August 2011 (UTC)[reply]
{{dts|869-07-09}} is fixed. JIMp talk·cont 11:59, 27 April 2012 (UTC)[reply]

Hidden year

Is it possible to create and add a new format with hidden year? For example:

Input: {{dts|format=md|2010|March|29}}
Output: <span style="display:none">02010-03-29</span> March 29
Display: March 29

This format would be very useful in a table where all the dates are from one or two different years and the listing of years looks excessive. For example: in this table, all the dates are either in 2010 or 2011 (i.e. between July 2010 and June 2011) and listing the years would be a little bit redundant as the article title already mentions the years. Right now that table uses {{dts}} templates without year such as: {{dts||March|29}}. However it produces <span style="display:none">02012-03-29</span> March 29 and the entry will be sorted as March 29, 2012, which will create incorrect sorting in the table. — MT (talk) 06:39, 29 March 2012 (UTC)[reply]

This is now working.
{{dts|format=md|March 29, 2010}}
Note that the date is written as one parameter in normal format. JIMp talk·cont 23:40, 23 April 2012 (UTC)[reply]
This is now working too.
{{dts|format=md|2010|March|29}}
JIMp talk·cont 09:05, 24 April 2012 (UTC)[reply]

Inconsistant sorting codes for BC

I've just discovered that years BC are not being coded correctly. The sorting code is out by 1 depending on whether the BC year is specified using BC or by a negative year. Worse is the case of using BCE, which is simply ignored.

  • {{dts|-2000|July|1}} gives -7999-07-01
  • {{dts|2000|July|1|BC}} gives -8000-07-01
  • {{dts|2000|July|1|BCE}} gives 02000-07-01

JIMp talk·cont 00:28, 25 April 2012 (UTC)[reply]

Actually, just rediscovered it. I'd found it three years ago but thought it might have been done on purpose. I can't think of any purpose though. JIMp talk·cont 01:53, 25 April 2012 (UTC)[reply]

Abbreviate by default

I'm working on a rewrite of the template to fix the problems mentioned above (plus some not mentioned). Besides fixing problems, though, what I'm also planning on is making the template default to abbreviating the month name. This template is used in tables where space is often tight and alignment is preferable. It is now possible to force the template to abbreviate the month & I've often done so but it means a little extra typing. It seems to me we'd be better off reversing this; let those who want the month name spelt out in full do the extra work. JIMp talk·cont 05:31, 27 April 2012 (UTC)[reply]

New version

I've put the new code in place as mentioned above. Besides fixing the problems mentioned above it also makes the hidden code consistant, gets rid of false dates (e.g. outputting the current day of the month when it wasn't input) and allows dm, md, my, d, m & y formats in addition to mdy & dmy. I believe it'll also allow more transclusions (less code ... looks like more but it's actually less (not calling {{MONTHNAME}}, {{MONTHNUMBER}}, etc.)). JIMp talk·cont 12:09, 27 April 2012 (UTC)[reply]

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? A Thousand Doors (talk | contribs) 01:25, 28 April 2012 (UTC)[reply]
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. Canuck89 (converse with me) 05:58, 28 April 2012 (UTC)[reply]

hidden Error:Invalid time

I created Category:Pages with parser function time errors and added it to the interface page so it is automatically populated. It took me a while to figure out that this template hides the error message under certain circumstances:

Markup Renders as
{{dts|8|15}}

Error in Template:Date table sorting: months must be an integer between 1 and 12

{{dts|8|Novermber|2011}}

Text output:

Error in Template:Date table sorting: 'Novermber' is not a valid month

HTML output:

<strong class="error">Error in [[Template:Date table sorting]]: 'Novermber' is not a valid month</strong>

The month is misspelled in the second example. This results in an error, but it is hidden when it runs through {{dts/out}}. ---— Gadget850 (Ed) talk 13:55, 27 April 2012 (UTC)[reply]

Leave a Reply