From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png

Release status:Extension status beta

ImplementationTemplate:Extension#type Parser function
DescriptionTemplate:Extension#description Takes two dates and returns all intermediary days.
Author(s)Template:Extension#username Kwisatz,
Jeroen De Dauw
Latest versionTemplate:Extension#version 0.1.1 (2010-09-13)
MediaWikiTemplate:Extension#mediawiki 1.15+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license Creative Commons Attribution Share Alike 3.0
Hooks usedTemplate:Extension#hook

Translate the DateDiff extension if it is available at translatewiki.net

Check usage and version matrix.

The DateDiff extension adds a 'dates' parser function that returns a list of intermediary days.


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::@@@@| ]]| }} }}

Number of days between two days (requires Extension:Arrays extension):

{{#arraydefine:days|{{#dates: | StartDate=2015-04-01 | EndDate=2015-04-10 }}}}


  • Download and place the file(s) in a directory called DateDiff in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/DateDiff/DateDiff.php";
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.