skip to navigation
skip to content

timeparser 0.7.4

A python-module to parse strings to time-, date-, datetime- or timedelta-objects.

Parse strings to objects of the datetime-module.

This module intends to make string-parsing to objects of the datetime-module as easy as possible while allowing a fine configuration about which kind of formats are supported.

Latest Version

The latest version of this project can be found at :


  • Option 1 : Install via pip

    pip install timeparser
  • Option 2 : If you have downloaded the source

    python install


Please visit the documentation on


How to use?

>>> import timeparser
>>> timeparser.parsedate('24.4.13'), 4, 24)
>>> timeparser.parsedate('24 Apr 2013'), 4, 24)
>>> timeparser.parsetime('234405')
datetime.time(23, 44, 5)
>>> timeparser.TimeFormats.config(allow_no_sep=False)
>>> timeparser.parsetime('234405')
ValueError: couldn't parse 234405 as time
>>> timeparser.parsedatetime('24-04-13_23:44:05')
datetime.datetime(2013, 4, 24, 23, 44, 5)

Changes in v0.7

The formats-classes accept an keyword try_hard, which means they try to build formats for what ever kind of string was passed -regardless of any configuration

Reporting Bugs

Please report bugs at github issue tracker:


thomst <> Thomas Leichtfuß

File Type Py Version Uploaded on Size
timeparser-0.7.4.tar.gz (md5) Source 2014-02-21 9KB