Skip to content

Commit b1fbc1e

Browse files
committed
2 parents c18e5f2 + 811122b commit b1fbc1e

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
* [Installation](#installation)
88
* [License](#license)
9+
* [Usage](#usage)
910

1011
## Installation
1112

@@ -17,6 +18,24 @@ Python 3.6+.
1718
$ pip install dateandtimeparser
1819
```
1920

21+
## Usage
22+
23+
sample input:
24+
```python
25+
from dateandtimeparser import DateTimeParser as parser
26+
27+
text = 'Today is 10/12/16 and tomorrow is January 01 2019.'
28+
dp = parser(text, start_year=2000, end_year=2020, datetime_format=None)
29+
```
30+
sample output:
31+
```python
32+
dp.datetime
33+
34+
#output
35+
[datetime(date='january 01 2019', token_span=(34, 49), token_index=(6, 8), format='%B %d %Y'),
36+
datetime(date='10/12/16', token_span=(9, 17), token_index=(2, 2), format='%d/%m/%y')]
37+
```
38+
2039
## License
2140

2241
dateandtimeparser is distributed under the terms of the

0 commit comments

Comments
 (0)