Template:Four digit: Difference between revisions

From WikiIslam, the online resource on Islam
Jump to navigation Jump to search
[checked revision][checked revision]
m (Protected "Template:Four digit": admin only, high usage ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
mNo edit summary
 
Line 2: Line 2:
{{ #ifexpr: ({{{1|0}}} > 99.5) | 0{{{1|0}}} |  
{{ #ifexpr: ({{{1|0}}} > 99.5) | 0{{{1|0}}} |  
{{ #ifexpr: ({{{1|0}}} > 9.5) | 00{{{1|0}}} | 000{{{1|0}}}  
{{ #ifexpr: ({{{1|0}}} > 9.5) | 00{{{1|0}}} | 000{{{1|0}}}  
}} }} }}
}} }} }}<noinclude>
 
==Usage==
 
*<nowiki>{{four digit|1}}</nowiki> gives 0001
*<nowiki>{{four digit|12}}</nowiki> gives 0012
*<nowiki>{{four digit|123}}</nowiki> gives 0123
*<nowiki>{{four digit|1234}}</nowiki> gives 1234
</noinclude>

Latest revision as of 23:15, 18 March 2014

0000

Usage

  • {{four digit|1}} gives 0001
  • {{four digit|12}} gives 0012
  • {{four digit|123}} gives 0123
  • {{four digit|1234}} gives 1234