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!!
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!!