Date formatting

From semantic-mediawiki.org
Jump to: navigation, search

Semantic extension(s): Semantic Forms

Further extension(s): -/-

Keyword(s): -/-

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