datefinder - extract dates from text
====================================
.. image:: https://github.com/akoumjian/datefinder/actions/workflows/python-package.yml/badge.svg
:target: https://github.com/akoumjian/datefinder
:alt: Build Status
.. image:: https://img.shields.io/pypi/dm/datefinder.svg
:target: https://pypi.python.org/pypi/datefinder/
:alt: pypi downloads per day
.. image:: https://img.shields.io/pypi/v/datefinder.svg
:target: https://pypi.python.org/pypi/datefinder
:alt: pypi version
.. image:: https://img.shields.io/conda/v/conda-forge/datefinder?color=blue&logo=anaconda
:target: https://anaconda.org/conda-forge/datefinder
:alt: conda 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
`dateutil` to convert to the datetime object.
Installation
------------
**With pip**
.. code-block:: sh
pip install datefinder
**With conda**
.. code-block:: sh
conda install -c conda-forge datefinder
How to Use
----------
.. code-block:: python
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
Demo
----
- 🎞️ `Video demo`_ by Calmcode.io. :star:
.. _Video demo: https://calmcode.io/shorts/datefinder.py.html
Raw data
{
"_id": null,
"home_page": "https://github.com/akoumjian/datefinder",
"name": "datefinder",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "datetime parser nlp",
"author": "Alec Koumjian",
"author_email": "akoumjian@gmail.com",
"download_url": "",
"platform": null,
"description": "datefinder - extract dates from text\n====================================\n\n.. image:: https://github.com/akoumjian/datefinder/actions/workflows/python-package.yml/badge.svg\n :target: https://github.com/akoumjian/datefinder\n :alt: Build Status\n\n.. image:: https://img.shields.io/pypi/dm/datefinder.svg\n :target: https://pypi.python.org/pypi/datefinder/\n :alt: pypi downloads per day\n\n.. image:: https://img.shields.io/pypi/v/datefinder.svg\n :target: https://pypi.python.org/pypi/datefinder\n :alt: pypi version\n\n.. image:: https://img.shields.io/conda/v/conda-forge/datefinder?color=blue&logo=anaconda\n :target: https://anaconda.org/conda-forge/datefinder\n :alt: conda version\n\n\nA python module for locating dates inside text. Use this package to extract all sorts \nof date like strings from a document and turn them into datetime objects.\n\nThis module finds the likely datetime strings and then uses \n`dateutil` to convert to the datetime object.\n\n\nInstallation\n------------\n\n**With pip**\n\n.. code-block:: sh\n\n pip install datefinder\n\n**With conda**\n\n.. code-block:: sh\n\n conda install -c conda-forge datefinder\n\nHow to Use\n----------\n\n\n.. code-block:: python\n\n In [1]: string_with_dates = \"\"\"\n ...: ...\n ...: entries are due by January 4th, 2017 at 8:00pm\n ...: ...\n ...: created 01/15/2005 by ACME Inc. and associates.\n ...: ...\n ...: \"\"\"\n\n In [2]: import datefinder\n\n In [3]: matches = datefinder.find_dates(string_with_dates)\n\n In [4]: for match in matches:\n ...: print match\n ...:\n 2017-01-04 20:00:00\n 2005-01-15 00:00:00\n\n\nDemo\n----\n\n- \ud83c\udf9e\ufe0f `Video demo`_ by Calmcode.io. :star: \n\n.. _Video demo: https://calmcode.io/shorts/datefinder.py.html\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Extract datetime objects from strings",
"version": "0.7.3",
"split_keywords": [
"datetime",
"parser",
"nlp"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "05d15444eb95ec7ae827681146d06a25",
"sha256": "c012e8cf60f8e80ee2df203f69338211ab2a68ec6e8a83c5c1e1f424d5743a9c"
},
"downloads": -1,
"filename": "datefinder-0.7.3-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "05d15444eb95ec7ae827681146d06a25",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 10633,
"upload_time": "2022-07-31T17:02:59",
"upload_time_iso_8601": "2022-07-31T17:02:59.045455Z",
"url": "https://files.pythonhosted.org/packages/16/84/4061a61d5d48026c112fd136b512b4a8a33dc705c5795bf3809845666b31/datefinder-0.7.3-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-07-31 17:02:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "akoumjian",
"github_project": "datefinder",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "datefinder"
}