jayvdb added a comment.
I'd split the code into three methods (which can be placed anywhere)
1. reduce template wikitext value to a normal text string (remove wiki markup) - probably textlib.py, 2. convert string to a date class using dateutil (https://labix.org/python-dateutil) - datetime, or class with better date support like https://pypi.python.org/pypi/jdcal/) - probably date.py, 3. convert datetime to WbTime (a @ classmethod)
TASK DETAIL https://phabricator.wikimedia.org/T66502
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: pywikipedia-bugs, Ladsgroup, Multichill, Ricordisamoa, jayvdb