承接 professional-wiki/wikibase-edtf 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

professional-wiki/wikibase-edtf

Composer 安装命令:

composer require professional-wiki/wikibase-edtf

包简介

Adds the EDTF data type to Wikibase

README 文档

README

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.

Professional Wiki created and maintains Wikibase EDTF. We provide Wikibase hosting, Wikibase development, and 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 https://edtf.wikibase.wiki

Usage

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:

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

Platform requirements for the latest version:

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

The recommended way to install Wikibase EDTF is using Composer with MediaWiki's built-in support for 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

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

Release notes

Version 3.0.0 - 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

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

Version 2.1.1 - 2023-03-31

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

Version 2.1.0 - 2023-01-18

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

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

professional-wiki/wikibase-edtf 适用场景与选型建议

professional-wiki/wikibase-edtf 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.47k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2021 年 03 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「extension」 「wiki」 「Semantic Web」 「datetime」 「standard」 「datatype」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 professional-wiki/wikibase-edtf 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 professional-wiki/wikibase-edtf 我们能提供哪些服务?
定制开发 / 二次开发

基于 professional-wiki/wikibase-edtf 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 13.47k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 8
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2021-03-02