Coder Social home page Coder Social logo

dpmontero / datefinder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akoumjian/datefinder

0.0 1.0 0.0 454 KB

Find dates inside text using Python and get back datetime objects

Home Page: http://datefinder.readthedocs.org/en/latest/

License: MIT License

Python 30.12% HTML 69.88%

datefinder's Introduction

datefinder - extract dates from text

travis build status pypi downloads per day pypi version

A python module for locating dates inside text. Use this package to extract all sorts of date like strings from a document and turn them into datetime objects.

This module finds the likely datetime strings and then uses the dateparser package to convert to the datetime object.

Installation

pip install datefinder

How to Use

.. automodule:: datefinder
   :members: find_dates


In [1]: string_with_dates = """
   ...: ...
   ...: entries are due by January 4th, 2017 at 8:00pm
   ...: ...
   ...: created 01/15/2005 by ACME Inc. and associates.
   ...: ...
   ...: """

In [2]: import datefinder

In [3]: matches = datefinder.find_dates(string_with_dates)

In [4]: for match in matches:
   ...:     print match
   ...:
2017-01-04 20:00:00
2005-01-15 00:00:00

Support

You can talk to us on Freenode IRC #python-datefinder or just submit an issue on github.

datefinder's People

Contributors

akoumjian avatar ranchodeluxe avatar jonafato avatar

Watchers

Diego Peñalver Montero avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.