Skip to content

Commit 811122b

Browse files
authored
sample output
1 parent d9e1057 commit 811122b

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

README.md

Lines changed: 11 additions & 1 deletion
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

@@ -19,11 +20,20 @@ $ pip install dateandtimeparser
1920

2021
## Usage
2122

23+
sample input:
2224
```python
2325
from dateandtimeparser import DateTimeParser as parser
2426

2527
text = 'Today is 10/12/16 and tomorrow is January 01 2019.'
26-
dp = parser(text, start_year=2000, end_year=2020)
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')]
2737
```
2838

2939
## License

0 commit comments

Comments
 (0)