Difference between revisions of "Template:Datewarn/doc"

From blackwiki
Jump to navigation Jump to search
imported>Mr. Stradivarius
(move docs from Template:Datewarn)
 
imported>Mr. Stradivarius
(use BASEPAGENAME instead of PAGENAME to avoid template loops)
Line 2: Line 2:
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
  
<code>{&#123;[[Template:{{PAGENAME}}|{{lcfirst:{{PAGENAME}}}}]]&#125;}</code> increases a date by one month
+
<code>{&#123;[[Template:{{BASEPAGENAME}}|{{lcfirst:{{BASEPAGENAME}}}}]]&#125;}</code> increases a date by one month
  
 
== Usage ==
 
== Usage ==
 
<!-- Abstract usage of the template -->
 
<!-- Abstract usage of the template -->
  
<code>{&#123;{{PAGENAME}}&#125;}</code> - displays a date one month after the current date
+
<code>{&#123;{{BASEPAGENAME}}&#125;}</code> - displays a date one month after the current date
  
<code>{&#123;{{PAGENAME}}|monthname|day|year|spacingchar&#125;}</code> - displays a date one month after the specified date
+
<code>{&#123;{{BASEPAGENAME}}|monthname|day|year|spacingchar&#125;}</code> - displays a date one month after the specified date
  
 
== Example ==
 
== Example ==
Line 17: Line 17:
 
| '''Result'''
 
| '''Result'''
 
|-
 
|-
| valign="top" | <code>{&#123;{{PAGENAME}}&#125;}</code>
+
| valign="top" | <code>{&#123;{{BASEPAGENAME}}&#125;}</code>
| {{msg:{{PAGENAME}}}}
+
| {{msg:{{BASEPAGENAME}}}}
 
|-
 
|-
| valign="top" | <code>{&#123;{{PAGENAME}}&#124;December|31&#125;}</code>
+
| valign="top" | <code>{&#123;{{BASEPAGENAME}}&#124;December|31&#125;}</code>
| {{msg:{{PAGENAME}}|December|31}}
+
| {{msg:{{BASEPAGENAME}}|December|31}}
 
|-
 
|-
| valign="top" | <code>{&#123;{{PAGENAME}}&#124;January|30|2004|_&#125;}</code>
+
| valign="top" | <code>{&#123;{{BASEPAGENAME}}&#124;January|30|2004|_&#125;}</code>
| {{msg:{{PAGENAME}}|January|30|2004|_}}
+
| {{msg:{{BASEPAGENAME}}|January|30|2004|_}}
 
|}
 
|}
  
Line 30: Line 30:
 
<!-- self-listing for quick access on edit history -->
 
<!-- self-listing for quick access on edit history -->
  
* {{Lts|{{PAGENAME}}}}
+
* {{Lts|{{BASEPAGENAME}}}}
 
* <!-- links to simlar of linked templates -->
 
* <!-- links to simlar of linked templates -->
  
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Date mathematics templates|{{PAGENAME}}]]
+
[[Category:Date mathematics templates|{{BASEPAGENAME}}]]
  
 
}}</includeonly>
 
}}</includeonly>

Revision as of 03:59, 1 November 2014

{{datewarn}} increases a date by one month

Usage

{{Datewarn}} - displays a date one month after the current date

{{Datewarn|monthname|day|year|spacingchar}} - displays a date one month after the specified date

Example

Code Result
{{Datewarn}} Template:Month+1 22, 2026
{{Datewarn|December|31}} Template:Month+1 31, 2027
{{Datewarn|January|30|2004|_}} Template:Month+1_29,_2004

See also