Extension:DateDiff
From MediaWiki.org
DateDiff Release status: beta |
|||
---|---|---|---|
Implementation | Parser function | ||
Description | Takes two dates and returns all intermediary days. | ||
Author(s) | Kwisatz, Jeroen De Dauw |
||
Latest version | 0.1.1 (2010-09-13) | ||
MediaWiki | 1.15+ | ||
Database changes | No | ||
License | CC BY-SA 3.0 | ||
Download | |||
|
|||
Translate the DateDiff extension if it is available at translatewiki.net |
|||
Check usage and version matrix; code metrics |
The DateDiff extension adds a 'dates' parser function that returns a list of intermediary days.
Usage[edit | edit source]
A typical use case are events in a semantic setup that span multiple days. In order to have the events appear on all days on a calendar provided by the Semantic Result Formats extension, you would use something like:
{{#ifeq: {{{recurring}}} | no | {{#arraymap: {{#dates: | StartDate={{{from}}} | EndDate={{{till}}} }}|,|@@@@|[[Has date::@@@@| ]]| }} }}
Installation[edit | edit source]
- Copy the code into files and extract the tarball in your
extensions/
folder. It should generate a new folder calledDateDiff
directly inside yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/DateDiff/DateDiff.php";
- Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.