2018-01-14 11:22:12 +00:00
|
|
|
humandate
|
|
|
|
---------
|
|
|
|
|
2018-01-14 11:40:14 +00:00
|
|
|
Parse human-readable dates in Python in arbitrary strings.
|
2018-01-14 11:22:12 +00:00
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
2018-01-14 11:40:14 +00:00
|
|
|
Install using `pip`:
|
|
|
|
|
|
|
|
```
|
|
|
|
pip install humandate
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
Use the `parse_date` function:
|
|
|
|
|
2018-01-14 11:39:06 +00:00
|
|
|
```python
|
2018-01-14 11:22:12 +00:00
|
|
|
from humandate import parse_date
|
|
|
|
|
|
|
|
print(parse_date('next month'))
|
|
|
|
print(parse_date('I was there an hour ago!'))
|
|
|
|
print(parse_date('Our event will be held at 12 tomorrow!'))
|
|
|
|
```
|
|
|
|
|
|
|
|
For more examples see [tests.py](humandate/tests.py)
|