Help:Date formatting

From semantic-mediawiki.org
(Redirected from Help:Date formatting)
Semantic extension(s):  -/-
Further extension(s): ParserFunctions
Keyword(s): formatting

Description:

This tip helps you to reformat the output of dates which is by default 2011/06/27 and still keep a proper annotation for it.

Prerequisite is that you have the extension ParserFunctions installed on your wiki. There are three variants:

1) ISO-style

[[Startdate::{{{startdate|}}}|{{#time:Y-m-d|{{{startdate}}}}}]]

→ 2011-06-27

2) US-style

Insert

$wgAmericanDates = true;

into LocalSettings.php

→ June 27, 2011

2) German-style

[[Startdate::{{{startdate|}}}|{{#time:d.m.Y|{{{startdate}}}}}]]

→ 27.06.2007

See also the result formatters for displaying results for properties of datatype "Date"Holds particular points in time.