`datels` is a simple CLI that displays a list of dates line by line.
Project description
datels
datels
is a simple CLI that displays a list of dates line by line.
Installation
To install datels with pip, run: pip install datels
Basic Usage
$ datels 1994-03-07 1994-03-10
1994/03/07
1994/03/08
1994/03/09
1994/03/10
Date format option
$ datels 1994-03-07 1994-03-10 --sep="-"
1994-03-07
1994-03-08
1994-03-09
1994-03-10
$ datels 1994-03-07 1994-03-10 --format "%c"
Mon Mar 7 00:00:00 1994
Tue Mar 8 00:00:00 1994
Wed Mar 9 00:00:00 1994
Thu Mar 10 00:00:00 1994
See strftime documentation for more information.
Inclusive option
$ datels 1994-03-07 1994-03-10 --inclusive both
1994/03/07
1994/03/08
1994/03/09
1994/03/10
$ datels 1994-03-07 1994-03-10 --inclusive left
1994/03/07
1994/03/08
1994/03/09
$ datels 1994-03-07 1994-03-10 --inclusive right
1994/03/08
1994/03/09
1994/03/10
Using in your python code not CLI
$ python
>>> from datels import list_dates
>>> dates = list_dates("1994-03-07", "1994-03-10", sep="-", inclusive="both")
>>> dates
['1994-03-07', '1994-03-08', '1994-03-09', '1994-03-10']
>>> # list_dates retuens list of string
>>> type(dates)
<class 'list'>
>>> type(dates[0])
<class 'str'>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
datels-1.0.0.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file datels-1.0.0.tar.gz
.
File metadata
- Download URL: datels-1.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.7.10 Darwin/21.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b73689a5df170f8c24327c2026ade8833b24229a8917ef4077787fd7030e495f |
|
MD5 | 2e5397585d33d520375162aea90bae9a |
|
BLAKE2b-256 | ac75f781cb01f2cbc965c70471e4b8ccec69eda82e40bec99ec8f1a5795290b6 |
File details
Details for the file datels-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: datels-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.7.10 Darwin/21.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b620659554e2e6d25bf38cb1c526cf328dc3f7db061d15177e05c00a1d9687a5 |
|
MD5 | abeadf7deedf2ed85288add444fe500b |
|
BLAKE2b-256 | 652d01e63ececc06ffda420c68920c2f1b0648193abf14bfb7423e7200453ba2 |