Difference between revisions of "Template:Is future month/doc"
Jump to navigation
Jump to search
imported>Izkala (Td) |
imported>Vanisaac m (→TemplateData: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other) |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 6: | Line 6: | ||
* {{#invoke:DemoTemplate|Is future month|month={{CURRENTMONTHNAME}}|year={{CURRENTYEAR}}}} | * {{#invoke:DemoTemplate|Is future month|month={{CURRENTMONTHNAME}}|year={{CURRENTYEAR}}}} | ||
* {{#ifeq:{{CURRENTMONTH}}|12 | * {{#ifeq:{{CURRENTMONTH}}|12 | ||
| − | |{{ | + | | {{#invoke:DemoTemplate|Is future month|month=January|year={{#expr:{{CURRENTYEAR}}+1}}}} |
| − | + | | {{#invoke:DemoTemplate|Is future month|month={{#time:F|now + 1 month}}|year={{CURRENTYEAR}}}} | |
| − | }} | + | }} |
| − | + | ==TemplateData== | |
| − | + | {{TemplateData header}} | |
| − | |||
| − | |||
| − | }} | ||
<templatedata> | <templatedata> | ||
| Line 33: | Line 30: | ||
} | } | ||
</templatedata> | </templatedata> | ||
| + | <includeonly>{{Sandbox other|| | ||
| + | <!-- Categories below this line, please; interwikis at Wikidata --> | ||
| + | [[Category:Boolean, register, and condition testing templates]] | ||
| + | [[Category:Date-computing templates based on current time]] | ||
| + | }}</includeonly> | ||
Latest revision as of 22:31, 25 April 2020
| This is a documentation subpage for Template:Is future month. It contains usage information, categories and other content that is not part of the original template page. |
Usage
Given a month and year, returns nothing if it is present or past, 1 if it is future
{{Is future month|year=2025|month=November}}→{{Is future month|year=2025|month=December}}→ 1
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Is future month
Returns "1" if the month and year given are in the future, blank otherwise.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Year | year | no description
| Number | required |
| Month | month | no description
| String | required |