Skip to main content

Package for converting string timestamps into datetimes.

Project description


Build Status
Coverage Status
PyPI version

Dateparser for creating datetime objects from arbitrarily formated date strings. Primary support for Norwegian date formats.

New version is a complete refactor:

  • Much faster parsing.
  • Reduced pattern complexity.
  • Improved matching rutine.
  • Some reduced functionality with less used time formats (centuries, relative dates, text based).


pip install dateparse-tobiasli


import datetime
from dateparse import DateParser
parser = DateParser()

# Dates with alpha components:
dt = parser.parse('5. januar 2015')
print(dt == [datetime.datetime(2015, 1, 5, 0, 0)])

# Multiple dates from same string:
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.

Source Distribution

dateparse-tobiasli-1.1.1.tar.gz (3.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page