# Tsresolve (Timestamp resolve)
Timestamp generator for either "Point of time" or "Duration of time" from Text (string). This uses recurrent, parsedatetime libraries to detect dates from strings. However, there are lot of major updations in this library which will allow user to generate either point of time or duration between two point of times.
## Usage:
##### `pip install tsresolve`
`from tsresolve import point_of_time, period_of_time`
`point_of_time("tomorrow")`
`period_of_time("tomorrow")`
#### Points to know:
1. It generates time stamps in ISO format.
2. When no ammod (last/previous/next..) is used before month/year, it detects the passed one.
Ex: Show calls from December 5th. (If you are asking this before December 5th 2018, it detects December 5th 2017 else, December 5th 2018). Test it with and without ammods for better understanding.
##### Examples:
Point of time: Expected result will be (Timestamp, Bool). Bool is "True" if time detected in phrase. Else, "False"
1. November 3rd at 3 p.m. | Result: (2019-11-03T15:00:00, True)
2. next monday evening at 5 o'clock | Result: (2018-12-24T17:00:00, True)
3. last saturday | Result: (2018-12-24T17:00:00, False)
Period of time: Expected result will be (Start timestamp, End timestamp)
1. from last tuesday till date | Result: ('2018-12-11T00:00:00', '2018-12-18T23:59:59')
2. from last november 5th to december 15th | Result: ('2018-11-01T00:00:00', '2018-12-18T23:59:59')
3. show something from november 5th 2017 | Result: ('2017-11-05T00:00:00', '2017-11-05T23:59:59')
#### Not handled:
1. Duration between two years. Ex: 2018-2019
2. Currently not handling "5th of January" format.
3. Time level is currently handled only in point of time, yet to be handled in period of time.
#### Credits
Tsresolve is inspired by Recurrent. It also uses the parsedatetime library for creating timestamps.
#### Author
Akhil kumar D (akhilkumar.doppalapudi@gmail.com)
Timestamp generator for either "Point of time" or "Duration of time" from Text (string). This uses recurrent, parsedatetime libraries to detect dates from strings. However, there are lot of major updations in this library which will allow user to generate either point of time or duration between two point of times.
## Usage:
##### `pip install tsresolve`
`from tsresolve import point_of_time, period_of_time`
`point_of_time("tomorrow")`
`period_of_time("tomorrow")`
#### Points to know:
1. It generates time stamps in ISO format.
2. When no ammod (last/previous/next..) is used before month/year, it detects the passed one.
Ex: Show calls from December 5th. (If you are asking this before December 5th 2018, it detects December 5th 2017 else, December 5th 2018). Test it with and without ammods for better understanding.
##### Examples:
Point of time: Expected result will be (Timestamp, Bool). Bool is "True" if time detected in phrase. Else, "False"
1. November 3rd at 3 p.m. | Result: (2019-11-03T15:00:00, True)
2. next monday evening at 5 o'clock | Result: (2018-12-24T17:00:00, True)
3. last saturday | Result: (2018-12-24T17:00:00, False)
Period of time: Expected result will be (Start timestamp, End timestamp)
1. from last tuesday till date | Result: ('2018-12-11T00:00:00', '2018-12-18T23:59:59')
2. from last november 5th to december 15th | Result: ('2018-11-01T00:00:00', '2018-12-18T23:59:59')
3. show something from november 5th 2017 | Result: ('2017-11-05T00:00:00', '2017-11-05T23:59:59')
#### Not handled:
1. Duration between two years. Ex: 2018-2019
2. Currently not handling "5th of January" format.
3. Time level is currently handled only in point of time, yet to be handled in period of time.
#### Credits
Tsresolve is inspired by Recurrent. It also uses the parsedatetime library for creating timestamps.
#### Author
Akhil kumar D (akhilkumar.doppalapudi@gmail.com)
Metadata
Release files for tsresolve 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tsresolve-0.6.tar.gz | 14.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tsresolve-0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.6 kB
Release files / tsresolve-0.6.tar.gz
| Download URL | tsresolve-0.6.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36792f7931e349b858af76688b2259fd45726193ba2ca17732168fecfebdf61d
|
|
BLAKE2b-256 checksum How to use checksums |
84b9940e249cc82e0d7aff8c9bdc06296ec7828391b6f9dd9f731d6cf24a6038
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.5.2
|
Release files / tsresolve-0.6-py3-none-any.whl
| Download URL | tsresolve-0.6-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b35c29098576d490b3245247c46a52a4bd8319ce98e2a6d94e9636d06fb8cd58
|
|
BLAKE2b-256 checksum How to use checksums |
412989d270e00f6f7756330dba033599d42e1835c51678f504339d39f9e4e2ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.5.2
|