Template talk:Ordinal/Archive 1

More efficient and more "correct" code?
The following code might be more efficient and match the actual data problem better:

Peet Ern (talk) 02:50, 16 December 2008 (UTC)


 * I agree. J IM ptalk·cont 10:38, 18 December 2008 (UTC)
 * Done. --- RockMFR 06:20, 22 December 2008 (UTC)

Edit request
editprotected Please update with. Per Template documentation/List Thankyou. -- ṃ• α• Ł• ṭ• ʰ• Ə• Щ•   @  06:03, 28 April 2008 (UTC)
 * Done. – Luna Santin  (talk) 08:34, 28 April 2008 (UTC)

Edit request
editprotected

There is a bug in this template; it inserts a space after its number in the default form. I have not checked the 'd' option. — Preceding unsigned comment added by 24.216.255.230 (talk)
 * I see that you recently edited Countdown with Keith Olbermann, which did have an erroneous space related to use of this template; however, the problem appears to have been caused by formatting at the article, which I believe I've fixed by removing a particular space, there. Is this problem duplicated anywhere else, or does it persist that I'm not aware of? – Luna Santin  (talk) 11:19, 15 July 2008 (UTC)

Edit request
Could we replace this:



with this:?

 {{#if:{$undefined$}|{{sup||}}{{#switch:{{#expr: mod 100}}|11|12|13=th|#default={{#switch:{{#expr: {{{1|}}} mod 10}}|1=st|2={{#if:{{{d|}}}||n}}d|3={{#if:{{{d|}}}||r}}d|#default=th}}{{#if:{$undefined$}|}}|}}

It adds a superscript parameter, and the wikicode makes a lot more sense than all of the subpages and safesubsts. Samwb123{{sup|T-C-E}} 19:19, 10 July 2010 (UTC)
 * {{done}}, ping my talk page if there are any issues. HJ Mitchell  &#124;  Penny for your thoughts?   23:15, 10 July 2010 (UTC)


 * This edit has been reverted. It broke all pages that use {{tl|Day}}, which uses this as a meta-template. Zzyzx11 (talk) 23:47, 10 July 2010 (UTC)
 * The actual template that seemed to be affected was {{tl|Day/nth day}}, as {{tl|Day}} takes the page name of each day of the week page (i.e January 1) and calls Day/nth day. Zzyzx11 (talk) 00:01, 11 July 2010 (UTC)
 * Well then fix {{tl|Day/nth day}} if you have to. Really, I don't see what problem this would cause, but we can fix whatever problem it causes. Samwb123{{sup|T-C-E}} 02:47, 11 July 2010 (UTC)
 * The syntax in your code was incorrect. Please do not request changes to widely used templates without thoroughly testing them first. &mdash; Martin (MSGJ · talk) 08:19, 11 July 2010 (UTC)

Edit request (revised)
OK. From the previous discussion, I saw that I had some problems with my wikimarkup. Well, I have tested it out now, and I think it works! With this code, both and  will produce 23d. Test it out for yourself, and see if there are any problems (however I don't believe there are any). Here it is:



Please consider changing Template:Ordinal to this code. It makes a lot more sense than all of the safesubsts. Thanks! Samwb123T-C-E 17:55, 11 July 2010 (UTC)
 * "safesubst" is to allow the template to be substituted cleanly (see Help:Safesubst). I don't see how your code allows for that. &mdash; Martin (MSGJ · talk) 18:20, 11 July 2010 (UTC)
 * Well, then how about we move this code to a subpage, then safesubst that subpage? Still, it makes a lot more sense than all of the current subpages. Samwb123T-C-E 18:44, 11 July 2010 (UTC)
 * I've had a look at what you are trying to do. I agree that doing away with the subpages would be simpler. I would recommend against using an unnumbered parameter for the "sup" feature as it makes the code much more complicated. It would be better to use the named parameter sup. I've put some code in /sandbox and examples on /testcases - would you like to have a look? All the safesubsts are necessary to make it possible to substitute this template. By the way, you can stop using editprotected now - I've got this watchlisted. &mdash; Martin (MSGJ · talk) 20:31, 11 July 2010 (UTC)
 * That works! Samwb123T-C-E 20:40, 11 July 2010 (UTC)
 * One question: is the "d" notation ever used with a subscript? If not, we should take that option away. &mdash; Martin (MSGJ · talk) 20:59, 11 July 2010 (UTC)

I'm not sure. I've looked all over... I'll try the reference desk. Samwb123T-C-E 21:37, 11 July 2010 (UTC)
 * I've updated the template. I notice you were directed towards Manual of Style (dates and numbers). In light of that, when you update the documentation, could you clarify that this feature is not to be used in article space? &mdash; Martin (MSGJ · talk) 10:17, 12 July 2010 (UTC)

Negative Ordinals
It's probably not a big deal, but can I suggest we change the template ever so slightly to handle negative numbers correctly? To do this, just change the two occurrences of:
 * expr:

to
 * expr:abs

As it stands now, calls such as are handled poorly: —RobinHood70 (talk • contribs) 22:32, 26 July 2010 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 05:30, 27 July 2010 (UTC)

d
Current code is

but should be

The current version uses "d" automatically if the second parameter is, even if the first parameter is   or something. The proposed version uses "d" only for numbers for which it should be used. However, the proposed vrsion does no sanity check to make sure the scond parameter is what it should be. So perhaps the following would be better:

Note that I have not tested this code.&mdash;msh210 &#x2120; 19:15, 16 March 2012 (UTC)
 * ❌. Please test the code in the Ordinal/sandbox and re-request.  An  optimist  on the  run!  08:17, 18 March 2012 (UTC)
 * Tested. Re-transcluding editprotected, above.&mdash;msh210 &#x2120; 22:05, 19 March 2012 (UTC)
 * ✅ Tra (Talk) 16:53, 21 March 2012 (UTC)
 * Thanks.&mdash;msh210 &#x2120; 19:18, 21 March 2012 (UTC)

Stripping ordinals?
Odd question, is there a way to have a template that strips the ordinal suffix from an existing ordinal number, such as a pagename which uses an ordinal number? Lestatdelc (talk) 07:23, 11 January 2013 (UTC)


 * Done: see cardinal. – Minh Nguyễn (talk, contribs) 07:04, 4 October 2013 (UTC)

Feature Request
Would it be possible to add a feature to have the template spell out the ordinal number in full? For instance, if I were to write  for instance, I'd like it to be able to be spelled out as. I know undefined undefined  has a feature like this and hope this template can be modified do the same for standardization's sake.

Cheers,

The Obento Musubi (talk) 08:55, 18 March 2015 (UTC)
 * I back this request. Turns out, that particular template already actually exists - Ordinal to word  Alex &#124; The &#124; Whovian  11:58, 26 June 2015 (UTC)

Superscripting
Why is superscripting supported anyway? It's not used on articlespace, so is this genuinely something we want to encourage on other namespaces? Chris Cunningham (user:thumperward: not at work) - talk 09:28, 8 September 2010 (UTC)


 * It should be removed per WP:ORDINAL. Jimp 03:40, 23 November 2016 (UTC)