Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Package for converting string timestamps into datetimes.

Project description

dateparse

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).

Install

pip install dateparse-tobiasli

Usage

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.

Files for dateparse-tobiasli, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size dateparse-tobiasli-1.1.1.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page