Metadata-Version: 2.1
Name: stringtime
Version: 0.0.1
Summary: Create dates from natural language expressions
Home-page: https://github.com/byteface/stringtime
Author: @byteface
Author-email: byteface@gmail.com
License: MIT
Download-URL: https://github.com/byteface/stringtime/archive/0.0.1 .tar.gz
Keywords: dates,natural language
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Other Audience
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: python-dateutil (==2.8.2)

# stringtime

A grammar for deriving Date objects from phrases.

api currently looks something like this...

```bash
from stringtime import Date
somedate = Date.from_phrase('an hour from now')
```

but is early days so will probably eventually parse via the Date constructor and on fail pass along to the regular dateutil parser.

## Installation

```bash
python3 -m pip install stringtime
```

## Usage and API

Here's a list of example phrases that can be used...

```bash
"an hour from now"
"1 hour from now"
"1 hour ago"
"Today"
"Yesterday"
"Tomorrow"
"Tuesday"
"On Wednesday"
"This Friday at 1"
"Last Wednesday at 5"
```

to see what else check the unit tests.

... more to come.

## CLI

There's several commands you can pass to sharpshooter on the command line.

```bash
stringtime -p 2 days frome now
```

## Tests

```bash
make test
```

## License

Do what you want with this code.

Uses David Beazley's PLY parser.

## Disclaimer

Might be buggy... only just made it yesterday.

Probs ignore this til at least version 0.3.

