Wikibase EDTF
Adds support for the Extended Date/Time Format (EDTF) Specification to Wikibase via a new data type.
On this page
External links
EDTF for Wikibase
Professional Wiki created Wikibase EDTF. We are Wikibase developers that provide professional Wikibase software development and Wikibase hosting.
We thank the Luxembourg Ministry of Culture for funding initial development.
Usage documentation
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.
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:
#shows only the raw EDTF string from the query results, in this case ?date
FILTER ( datatype(?date) = xsd:edtf )
#shows only the dumbed down EDTF strings from the query results, in this case ?date
FILTER ( datatype(?date) = xsd:dateTime )
Note that if you are using OPTIONAL on the property, then you need to move the FILTER within the OPTIONAL statement.
Installation
Requirements
- PHP 7.4 or later
- MediaWiki 1.37 or later
- Wikibase Repository
Load and enable
Load the extension using Composer:
COMPOSER=composer.local.json composer require --no-update professional-wiki/wikibase-edtf:^2.0
Enable the extension by adding the following to your LocalSettings.php:
wfLoadExtension( 'WikibaseEdtf' );
You can verify the installation by checking your wiki's Special:Version page.
Wikibase Hosting
Check out our
tailored Wikibase hosting
and
Wikibase cloud hosting
services.
Both include Wikibase EDTF and many other MediaWiki extensions.

More MediaWiki Extensions
Professional MediaWiki Services
MediaWiki services by the authors of Wikibase EDTF

Get superior results from the best MediaWiki developers with a proven track record of creating MediaWiki extensions & integrations.

Make your wiki look great! Use a time-tested responsive MediaWiki theme, or have us create a custom MediaWiki skin for you.

Let us take care of your wiki. We are MediaWiki hosting experts and provide cloud hosting, dedicated hosting, and on-premise hosting.

Bring your wiki to the next level by leveraging our MediaWiki expertise. From strategic planning to wikitext, we have you covered.

Migrate your wiki with confidence. We move your MediaWiki to a new home, or we help you migrate from another system to MediaWiki.

Keep your MediaWiki up-to-date and secure. We offer MediaWiki maintenance services to keep your wiki running smoothly.