PHPackages                             professional-wiki/wikibase-edtf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. professional-wiki/wikibase-edtf

ActiveMediawiki-extension

professional-wiki/wikibase-edtf
===============================

Adds the EDTF data type to Wikibase

3.0.0(10mo ago)711.3k↓22.2%8[4 issues](https://github.com/ProfessionalWiki/WikibaseEdtf/issues)GPL-2.0-or-laterPHPPHP &gt;=7.4CI failing

Since Mar 18Pushed 1mo ago8 watchersCompare

[ Source](https://github.com/ProfessionalWiki/WikibaseEdtf)[ Packagist](https://packagist.org/packages/professional-wiki/wikibase-edtf)[ Docs](https://professional.wiki/en/extension/wikibase-edtf)[ GitHub Sponsors](https://github.com/JeroenDeDauw)[ RSS](/packages/professional-wiki-wikibase-edtf/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (2)Versions (10)Used By (0)

Wikibase EDTF
=============

[](#wikibase-edtf)

[![GitHub Workflow Status](https://camo.githubusercontent.com/e2ae4f7afabc01006a22aeb1d595ae53367280d1533a74bb4e2779d4bb681a1b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f50726f66657373696f6e616c57696b692f57696b6962617365456474662f63692e796d6c3f6272616e63683d6d6173746572)](https://github.com/ProfessionalWiki/WikibaseEdtf/actions?query=workflow%3ACI)[![Latest Stable Version](https://camo.githubusercontent.com/54271b2dcb6329e66622028f55c9c1e7ed249c7f468412550a2336bf93738ddd/68747470733a2f2f706f7365722e707567782e6f72672f70726f66657373696f6e616c2d77696b692f77696b69626173652d656474662f762f737461626c65)](https://packagist.org/packages/professional-wiki/wikibase-edtf)[![Download count](https://camo.githubusercontent.com/58a8a0ae2f701fce60ccb5e465c585d80e68cd871c32d1fbf1747bb3dd8b4061/68747470733a2f2f706f7365722e707567782e6f72672f70726f66657373696f6e616c2d77696b692f77696b69626173652d656474662f646f776e6c6f616473)](https://packagist.org/packages/professional-wiki/wikibase-edtf)[![License](https://camo.githubusercontent.com/e12636abd8829921e32f8440e6555513efde12e29d7725622e2db192d9925b0e/68747470733a2f2f706f7365722e707567782e6f72672f70726f66657373696f6e616c2d77696b692f77696b69626173652d656474662f6c6963656e7365)](LICENSE)

[MediaWiki](https://www.mediawiki.org) extension that adds support for the [Extended Date/Time Format (EDTF) Specification](https://www.loc.gov/standards/datetime/) to [Wikibase](https://wikibase.consulting/what-is-wikibase/) via a new data type.

[Professional Wiki](https://professional.wiki) created and maintains Wikibase EDTF. We provide [Wikibase hosting](https://professional.wiki/en/hosting/wikibase), [Wikibase development](https://professional.wiki/en/wikibase-software-development), and [Wikibase consulting](https://wikibase.consulting/).

Wikibase EDTF is an open-source project that was made possible with the financial support of the Luxembourg Ministry of Culture. Contributions are welcome!

You can find a demo of this extension at

- [Usage](#usage)
    - [RDF export](#rdf-export)
- [Installation](#installation)
- [Running the tests](#running-the-tests)
- [Release notes](#release-notes)

Usage
-----

[](#usage)

[![](.github/youtube.png "Play video")](https://www.youtube.com/watch?v=U5ndjtuDPf8)

### RDF export

[](#rdf-export)

Wikibase EDTF gives its value to the native RDF export mechanism using the datatypes xsd:EDTF datatype (e.g. "1867-05-26"^^xsd:edtf) and xsd:dateTime. For the latter datatype it turns EDTF values into standard Wikibase time (xsd:dateTime) values. 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](src/Services/TimeValueBuilder.php).

Apparent duplicate results using SPARQL / Blazegraph
----------------------------------------------------

[](#apparent-duplicate-results-using-sparql--blazegraph)

Because EDTF exposes the values as both xsd:edtf and a dumbed down xsd:dateTime you will get two values when querying properties with this datatype. using a filter in your SPARQL query can remove the value that you are not interested in:

```
FILTER ( datatype(?date) = xsd:edtf ) #shows only the raw EDTF string from the query results, in this case ?date

```

```
FILTER ( datatype(?date) = xsd:dateTime ) #shows only the dumbed down EDTF strings from the query results, in this case ?date

```

note that if you are using OPTIONAL on the property, then you need to move the FILTER within the OPTIONAL statement.

Installation
------------

[](#installation)

Platform requirements for the latest version:

- [PHP](https://www.php.net) 7.4 or later, including PHP 8.x, tested up to PHP 8.4
- [MediaWiki](https://www.mediawiki.org) 1.40 up to 1.44
- [Wikibase Repository](https://www.mediawiki.org/wiki/Extension:Wikibase_Repository) compatible with your MediaWiki version

See the [release notes](#release-notes) for more information on the different versions of this extension.

The recommended way to install Wikibase EDTF is using [Composer](https://getcomposer.org) with [MediaWiki's built-in support for Composer](https://professional.wiki/en/articles/installing-mediawiki-extensions-with-composer).

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

```
COMPOSER=composer.local.json composer require --no-update professional-wiki/wikibase-edtf:^3.0.0
```

If you have MediaWiki 1.39, 1.38, or 1.37, use `^2.0.0`. If you have MediaWiki 1.36 or earlier, use `^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 wiki's "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
-----------------

[](#running-the-tests)

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

Release notes
-------------

[](#release-notes)

### Version 3.0.0 - 2025-07-10

[](#version-300---2025-07-10)

- Raised minimum MediaWiki and Wikibase versions from 1.37 to 1.40
- Added support for MediaWiki and Wikibase 1.44

### Version 2.1.2 - 2025-07-08

[](#version-212---2025-07-08)

- Added support for MediaWiki and Wikibase 1.40, 1.41, 1.42, and 1.43
- Translation updates

### Version 2.1.1 - 2023-03-31

[](#version-211---2023-03-31)

- Added support for MediaWiki and Wikibase 1.38 and 1.39
- Translation updates

### Version 2.1.0 - 2023-01-18

[](#version-210---2023-01-18)

- Added support for EDTF 3.x, which brings improved humanizations
- Translation updates

### Version 2.0.1 - 2022-03-26

[](#version-201---2022-03-26)

- Added missing messages for Special:ListDatatypes

### Version 2.0.0 - 2022-01-23

[](#version-200---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

[](#version-120---2021-04-28)

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

### Version 1.1.0 - 2021-04-04

[](#version-110---2021-04-04)

- Added plain EDTF value to RDF output

### Version 1.0.0 - 2021-03-19

[](#version-100---2021-03-19)

- Initial release for MediaWiki/Wikibase 1.35 ([Release announcement](https://wikibase.consulting/wikibase-edtf/), [Demo video](https://www.youtube.com/watch?v=U5ndjtuDPf8))
- 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

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance62

Regular maintenance activity

Popularity33

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~196 days

Recently: every ~300 days

Total

9

Last Release

313d ago

Major Versions

1.2.0 → 2.0.02022-01-23

2.1.2 → 3.0.02025-07-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/451bd4039d530fed8f9c3da91bfa519233a397d2182cdfdcad700f6cfea19b7f?d=identicon)[Jeroen De Dauw](/maintainers/Jeroen%20De%20Dauw)

![](https://avatars.githubusercontent.com/u/1104078?v=4)[Karsten Hoffmeyer](/maintainers/kghbln)[@kghbln](https://github.com/kghbln)

---

Top Contributors

[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (129 commits)")[![translatewiki](https://avatars.githubusercontent.com/u/24829418?v=4)](https://github.com/translatewiki "translatewiki (26 commits)")[![Universal-Omega](https://avatars.githubusercontent.com/u/54654040?v=4)](https://github.com/Universal-Omega "Universal-Omega (6 commits)")[![kghbln](https://avatars.githubusercontent.com/u/1104078?v=4)](https://github.com/kghbln "kghbln (5 commits)")[![mzeinstra](https://avatars.githubusercontent.com/u/5627431?v=4)](https://github.com/mzeinstra "mzeinstra (4 commits)")[![alistair3149](https://avatars.githubusercontent.com/u/9260542?v=4)](https://github.com/alistair3149 "alistair3149 (2 commits)")[![malberts](https://avatars.githubusercontent.com/u/1428594?v=4)](https://github.com/malberts "malberts (2 commits)")[![rti](https://avatars.githubusercontent.com/u/80712?v=4)](https://github.com/rti "rti (1 commits)")

---

Tags

edtfmediawikimediawiki-extensionwikibasewikibase-extensionmediawikidatetimestandardextensionwikiSemantic Webstructured-datadatatypewikidatawikibaseseasonsEDTFExtended Date Time Formattime intervaluncertainty

### Embed Badge

![Health badge](/badges/professional-wiki-wikibase-edtf/health.svg)

```
[![Health](https://phpackages.com/badges/professional-wiki-wikibase-edtf/health.svg)](https://phpackages.com/packages/professional-wiki-wikibase-edtf)
```

###  Alternatives

[professional-wiki/wikibase-local-media

Adds the local media data type to Wikibase

127.0k](/packages/professional-wiki-wikibase-local-media)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3164.5k](/packages/starcitizentools-citizen-skin)[mediawiki/bootstrap

Provides the Bootstrap 5 web front-end framework to MediaWiki skins and extensions

15102.0k5](/packages/mediawiki-bootstrap)[mediawiki/simple-batch-upload

Basic, no-frills uploading of multiple files to MediaWiki

2321.3k](/packages/mediawiki-simple-batch-upload)[mediawiki/semantic-bundle

Bundle extension that installs and loads Semantic MediaWiki and associated extensions

204.4k](/packages/mediawiki-semantic-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
