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}} 2019
{{CURRENTDAY}}
{{CURRENTDAY2}}
{{CURRENTDAYNAME}}
20
20 (zero-padded)
Wednesday
{{CURRENTMONTH}}
{{CURRENTMONTH2}}
{{CURRENTMONTHNAME}}
02
02 (zero-padded)
February
{{TODAY}} 2019-02-20
{{TOMORROW}} 2019-02-21
{{YESTERDAY}} 2019-02-19
{{DATENEXTWEEK}} 2019-02-27
{{DATELASTWEEK}} 2019-02-13
{{DATENEXTMONTH}} 2019-03-20
{{DATELASTMONTH}} 2019-01-20
{{DATENEXTYEAR}} 2020-02-21
{{DATELASTYEAR}} 2018-02-20

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