Can someone please tell me how can I parse a French date in Python? Sorry if the question is a duplicate but I couldn\'t find one.
Here is what I have tried using t
dateparser module can parse dates in the question:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import dateparser # $ pip install dateparser
for date_string in [u"Aujourd'hui", "3 juillet", u"4 Août", u"Hier"]:
print(dateparser.parse(date_string).date())
It translates dates to English using a simple yaml config and passes the date strings to dateutil.parser.
2015-09-09
2015-07-03
2015-08-04
2015-09-08