Help:Magic Words

From MixesDB
Jump to: navigation, search

For the default list of magic words see mediawiki.org/wiki/Help:Magic_words

Page names

Input Output
{{PAGENAME}} Magic Words
{{FULLPAGENAME}} Help:Magic Words
{{NAMESPACE}} Help
{{BASEPAGENAME}} On User:MDB/Quick Links this would be "MDB"
{{SUBPAGENAME}} On User:MDB/Quick Links this would be "Quick Links"
URL encoded page names

The following are equivalents encoded for use in URLs (i.e. spaces replaced with underscores and some characters percent-encoded):

  • {{FULLPAGENAMEE}}
  • {{PAGENAMEE}}
  • {{BASEPAGENAMEE}}
  • {{SUBPAGENAMEE}}

Dates

Input Output
{{CURRENTYEAR}} 2017
{{CURRENTDAY}}
{{CURRENTDAY2}}
{{CURRENTDAYNAME}}
30
30 (zero-padded)
Sunday
{{CURRENTMONTH}}
{{CURRENTMONTH2}}
{{CURRENTMONTHNAME}}
04
04 (zero-padded)
April
{{TODAY}} 2017-04-30
{{TOMORROW}} 2017-05-01
{{YESTERDAY}} 2017-04-29
{{DATENEXTWEEK}} 2017-05-07
{{DATELASTWEEK}} 2017-04-23
{{DATENEXTMONTH}} 2017-05-30
{{DATELASTMONTH}} 2017-03-30
{{DATENEXTYEAR}} 2018-05-01
{{DATELASTYEAR}} 2016-04-30

To display a date according to your own "date format" preference (e.g. "30 April 2017"), use {{#dateformat:}}, e.g. {{#dateformat: {{TODAY}} }}.