tatuylonen / wikitextprocessor

Python package for WikiMedia dump processing (Wiktionary, Wikipedia etc). Wikitext parsing, template expansion, Lua module execution. For data extraction, bulk syntax checking, error detection, and offline formatting.
Other
93 stars 23 forks source link

Implement mw.language:formatDate() #256

Closed kristian-clausal closed 6 months ago

kristian-clausal commented 6 months ago

Issue #226 case 'Durée'

mw.language:formatDate() was only partially implemented.

However, the same kind of code needed there has already been (mostly?) implemented in the {{#time:...}} parser function in parserfns, so we can reuse code from there by refactoring the meaningful bits out and making a new mw_language_format_date_python function to be called from Lua code that will do most of the things needed here.

I spent too much time trying to roll my own implementation... before realizing there already was one in parserfns!!

LeMoussel commented 6 months ago

Resolved