Adds the EDTF data type to Wikibase

Fund package maintenance!

Installs: 1 025

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 5

Forks: 2

Open Issues: 3


2.0.1 2022-03-26 12:01 UTC

This package is auto-updated.

Last update: 2022-05-16 11:09:43 UTC


GitHub Workflow Status Latest Stable Version Download count License

MediaWiki extension that adds support for the Extended Date/Time Format (EDTF) Specification to Wikibase via a new data type.

Wikibase EDTF has been made possible with the financial support of the Luxembourg Ministry of Culture. It is an open source project developed and maintained by Professional.Wiki. Contributions are welcome!

You can find a demo of this extension at



RDF export

Wikibase EDTF turns EDTF values into standard Wikibase time values that are then given to the native RDF export mechanism. Because Wikibase time values are a lot less expressive, the EDTF values are simplified in this process.

  • EDTF date or time: Precision and time zone are retained. Qualifications and unspecified digits are discarded.
  • EDTF Set: Each date in the set is exported.
  • EDTF Season: One date for each month is exported, each having month precision.
  • EDTF Interval: Nothing is exported (since there does not seem to be a reasonable default).

For cases where multiple dates are put in the RDF export, like with seasons and sets, there is nothing in the RDF indicating these values logically belong together.

If you can read PHP, you can see the simplification code in TimeValueBuilder.php.


Platform requirements:

See the release notes for more information on the different versions of this extension.

First install MediaWiki and Wikibase Repository.

The recommended way to install Wikibase EDTF is using Composer with MediaWiki's built-in support for Composer.

On the commandline, go to your wikis root directory. Then run these two commands:

If you have MediaWiki 1.37, use ^2.0.0 instead of ^1.2.0

COMPOSER=composer.local.json composer require --no-update professional-wiki/wikibase-edtf:^1.2.0
composer update professional-wiki/wikibase-edtf --no-dev -o

Enabling the extension

Then enable the extension by adding the following to the bottom of your wikis "LocalSettings.php" file:

wfLoadExtension( 'WikibaseEdtf' );

You can verify the extension was enabled successfully by opening your wiki's "Special:Version" page in your browser.

Running the tests

  • PHP tests: php tests/phpunit/phpunit.php -c extensions/WikibaseEdtf/

Release notes

Version 2.0.1 - 2022-03-26

  • Added missing messages for Special:ListDatatypes

Version 2.0.0 - 2022-01-23

  • Added support for MediaWiki and Wikibase 1.37
  • Raised minimum MediaWiki and Wikibase versions to 1.37

Version 1.2.0 - 2021-04-28

  • Improved humanization of sets
  • Improved validation of intervals and sets
  • Fixed DoS vector

Version 1.1.0 - 2021-04-04

  • Added plain EDTF value to RDF output

Version 1.0.0 - 2021-03-19

  • Initial release for MediaWiki/Wikibase 1.35 (Release announcement, Demo video)
  • EDTF datatype with
    • Support for EDTF levels 0, 1 and 2
    • Input validation
    • Display of humanized and internationalized version in the reading UI
    • RDF export (using standard Wikibase dates) for most values