Template:IfNumEdit This Page

From FamilySearch Wiki

[view] [edit] [history] [purge] Documentation icon Template documentation


Checks if the parameter has a numeric value.

Contents

Usage

{{IfNum|1=|2=|3=}}

Parameters

Parameter name Description Default value required or optional?

parameter #1 (1) expression to test empty required
parameter #2 (2) statement to show is true (parameter has a numeric value) empty optional
parameter #3 (3) statement to show is false (parameter is text or empty). empty optional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Examples

{{IfNum | 1234| number| not a number}} = number
{{IfNum | 1.34| number| not a number}} = number
{{IfNum | 0123| number| not a number}} = number
{{IfNum | -1| number| not a number}} = number
{{IfNum | +010| number| not a number}} = number
{{IfNum | 2010-01-01| number| not a number}} = not a number
{{IfNum | 2010-01| number| not a number}} = not a number
{{IfNum | abcde| number| not a number}} = not a number
{{IfNum | | number| not a number}} = not a number
  • This page was last modified on 12 March 2012, at 21:44.
  • This page has been accessed 253 times.