Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Equal 1st?  
2 comments  




2 Module:Ordinal  
5 comments  




3 Substitution  
6 comments  




4 Handling inputs that are already ordinals  
3 comments  













Template talk:Ordinal




Page contents not supported in other languages.  









Template
Talk
 

















Read
Edit
Add topic
View history
 








Tools
   


Actions  



Read
Edit
Add topic
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Equal 1st?

[edit]

HIMSGJ, as the last user to make changes to this template, would the code be able to be modified so that {{Ordinal|=1}} could produce =1st. Know how pesky equal signs are in code but it would be great if this could be done. Cheers – Ianblair23 (talk) 07:19, 15 August 2017 (UTC)[reply]

@Ianblair23: Module:Ordinal, which I hope can replace the current template, allows for any arbitrary string to come before the numeral. As long as the last characters of the parameter are digits, the module should give the correct output. For example, {{#invoke:Ordinal|ordinal|{{=}}1}} outputs =1st. Abjiklam (talk) 15:35, 20 December 2017 (UTC)[reply]
[edit]

I've rewritten this template as a module at Module:Ordinal. I've tested it at Template:Ordinal/sandbox and Template:Ordinal/testcases and it doesn't seem to break, but I would like some input from others before I make any changes to the main template. Can someone confirm that the module doesn't break and can replace the current template? Abjiklam (talk) 15:02, 20 December 2017 (UTC)[reply]

I'd like to see the protection level of the module set to TE (the same level as the template) before going live. Cabayi (talk) 13:49, 21 December 2017 (UTC) ...oh, forgot, no problems spotted with the output. Cabayi (talk) 13:50, 21 December 2017 (UTC)[reply]
WP:RFPP submitted. Cabayi (talk) 13:56, 21 December 2017 (UTC)[reply]
Protection is now in place, looks good-to-go to me. @Abjiklam: -- Cabayi (talk) 15:27, 21 December 2017 (UTC)[reply]
@Cabayi: Thank you. It's now live. Abjiklam (talk) 15:32, 21 December 2017 (UTC)[reply]

Substitution

[edit]

Since rewriting as a Module, the substitution feature doesn't work. I don't know why. Or am I using it incorrectly?

{{subst:Ordinal|13}}
turns into:
{{#invoke:Ordinal|ordinal}}

GoldRingChip 13:12, 6 February 2018 (UTC)[reply]

@GoldRingChip: I'm looking into your issue. Bellezzasolo Discuss 15:47, 24 February 2018 (UTC)[reply]
OK, yeah. It should turn into {{#invoke:Ordinal|ordinal|13}} - which gives 13th, or more generally {{#invoke:Ordinal|ordinal|{{{1}}}}}
The simplest way around this is not to subst, because then the #invoke automatically works it out. I don't know why you want to subst this, but it says that it can be. Bellezzasolo Discuss 15:50, 24 February 2018 (UTC)[reply]

I've reopened the TPER with a fix at the sandbox. Bellezzasolo Discuss 15:56, 24 February 2018 (UTC)[reply]

Handling inputs that are already ordinals

[edit]

I'd like this template to better handle inputs that are already ordinals. For instance, {{Ordinal}} should just spit back out 47th, not 47thth. This would help make templates more flexible in case a user accidentally enters an ordinal when they should've just gone with the numeral. Would anyone be able to help implement that? {{u|Sdkb}}talk 22:14, 24 January 2022 (UTC)[reply]

Noting that a current workaround is to use {{ordinal|{{cardinal|#}}}}. {{u|Sdkb}}talk 22:18, 24 January 2022 (UTC)[reply]
Also noting that text inputs, e.g. second, have the same issue. {{u|Sdkb}}talk 22:22, 24 January 2022 (UTC)[reply]

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template_talk:Ordinal&oldid=1234541883"

Categories: 
Template-Class mathematics articles
NA-priority mathematics articles
 



This page was last edited on 14 July 2024, at 22:04 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki