Package for converting string timestamps into datetimes.
Project description
dateparse
Dateparser for creating datetime objects from arbitrarily formated date strings. Primary support for Norwegian date formats.
New version is a complete refactor, with reduced complexity and functionality.
Install
pip install tregex-tobiasli
import datetime
from dateparse import DateParser
parser = DateParser()
dt = parser.parse('5. januar 2015')
print(dt == [datetime.datetime(2015, 1, 5, 0, 0)])
dt = parser.parse('1/12/2014 kl 12, 11.12.2015 kl 14')
print(dt == [datetime.datetime(2014, 12, 1, 12, 00), datetime.datetime(2015, 12, 11, 14, 00)])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.