Difference between revisions of "Module:Leapyear/doc"
Jump to navigation
Jump to search
blackwiki>BrandonXLF |
blackwiki>BrandonXLF |
||
| Line 8: | Line 8: | ||
== Example == | == Example == | ||
| − | {{#invoke:leapyear|main | + | {{#invoke:leapyear|main}} |
| − | + | {{code|<nowiki>{{#invoke:leapyear|main}}</nowiki>}} | |
| − | |||
| − | < | + | {{#invoke:leapyear|main|yes|no}} |
| + | |||
| + | {{code|<nowiki>{{#invoke:leapyear|main|yes|no}}</nowiki>}} {{para||yes}} {{para||no}} | ||
| + | |||
| + | |||
| + | {{#invoke:leapyear|main|blank|0}} | ||
| + | |||
| + | {{code|<nowiki>{{#invoke:leapyear|main|blank|0}}</nowiki>}} {{para||blank}} {{para||0}} | ||
| + | |||
| + | |||
| + | {{#invoke:leapyear|main|1|blank}} | ||
| + | |||
| + | {{code|<nowiki>{{#invoke:leapyear|main|1|blank}}</nowiki>}} {{para||1}} {{para||blank}} | ||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | ||
Revision as of 15:22, 13 August 2018
Usage
{{#invoke:Leapyear|main}}
By default returns 1 if it's a leap year and 0 when it isn't if unnamed parameter 1 is defined it returns that when it is a leap-year and if unnamed parameter 2 is defined it returns it when it's not a leap year.
Use local mLeapyear = require('Module:Leapyear')._main when using in a template that already uses Module:Arguments
Example
0
{{#invoke:leapyear|main}}
no
{{#invoke:leapyear|main|yes|no}} |yes |no
0
{{#invoke:leapyear|main|blank|0}} |blank |0
{{#invoke:leapyear|main|1|blank}} |1 |blank