Skip to main content

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.

Source Distribution

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

Uploaded Source

File details

Details for the file dateparse-tobiasli-1.1.1.tar.gz.

File metadata

  • Download URL: dateparse-tobiasli-1.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.5.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

File hashes

Hashes for dateparse-tobiasli-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c49ef4e162aba1825f9733d6dc893c40ef631fed76ed82164245d5699caf6c70
MD5 24e491dc272193e17ae3fbdeefb45b0c
BLAKE2b-256 e8a325afb48faf743215e88d59a802e375f1df0e32917e7fb406a5f90df3ba2e

See more details on using hashes here.

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