Crates.io | days |
lib.rs | days |
version | 0.1.0 |
source | src |
created_at | 2023-05-24 12:20:25.550434 |
updated_at | 2023-05-24 12:20:25.550434 |
description | Command-line utility to calculate numbers of days between dates. |
homepage | |
repository | |
max_upload_size | |
id | 873016 |
size | 19,992 |
A simple CLI tool for calculating how far away dates are from each other. Inspired by WolframAlpha's ability to do this with natural language inputs.
The focus is primarily on days as the unit of time (hence the name of the crate), but support for other units of time — both small and large — is planned.
Features:
# install it
cargo install days
# use it!
days since 1970-01-01
You can always run days --help
to see the supported commands.
since
: Calculate how many days have passed since a given date.
days since 1970-01-01
until
: Calculate how many days are left until a given date.
days until 2038-01-19
count
: Calculate the date N days from today.
days count 100
The intention is to add support for natural language inputs to make it easier to use on the fly while keeping the feel of a robust CLI tool by providing consistent options for input and output formats.
Currently planned:
This tool is based on chrono
, the excellent Rust date/time library. Note that this has some limitations when working with dates outside of the Gregorian calendar. See their limitations section for full details.