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 some LOCAL[TIME] parserfns #240

Closed kristian-clausal closed 7 months ago

kristian-clausal commented 7 months ago

Originally by LeMoussel Co-authored by: LeMoussel

No tests because mocking datetime.now seems impossible for now.

A better implementation might be to give Wtp it's own static time object that can be used instead of actual time, so that it can be set to whatever is needed.

A simpler implementation is to just always give out the same exact time, maybe the start of the epoch.