User:Lucamauri/Sandbox/ParserTime

This parser function takes a date and/or time (in the Gregorian calendar) and formats it according to the syntax given. A date/time object can be specified; the default is the value of the magic>Special:MyLanguage/Help:Magic words#Date and time|magic word   – that is, the time the page was last rendered into HTML.



The list of accepted formatting codes is given in the table to the right. Any character in the formatting string that is not recognized is passed through unaltered; this applies also to blank spaces (the system does not need them for interpreting the codes). There are also two ways to escape characters within the formatting string: In addition, the digraph  is interpreted as a single literal "x".
 * 1) A backslash followed by a formatting character is interpreted as a single literal character
 * 2) Characters enclosed in double quotes are considered literal characters, and the quotes are removed.



The  can be in any format accepted by PHP's strtotime function. Both absolute (eg ) and relative (eg  ) times are accepted.


 * &rarr; 
 * &rarr; 
 * &rarr; 
 * &rarr; 
 * &rarr; 
 * &rarr; 
 * &rarr; 

The  in ISO 639-3 (?) allows the string to be displayed in the chosen language

The  parameter specifies if the date/time object refers to the local timezone or to UTC.

This is a boolean parameters: its value is determined by casting the value of the argument (see the official PHP documentation for details on how string are cast to boolean values).

See the following examples for details: