simple cmd tool for calculate a date in the future or a duration.
- install Rust, see here
- clone the repo
git clone https://github.com/Zercerium/datetime_calculator.git
cd datetime_calculator
- install the project
cargo install --path .
- if you don't apply a sign the last applied sign will be used for all following durations; the default sign is
+
10d-20m60s
means +10 days, -20 minutes, -60 (minus) seconds
TODO
dtc today 20w
dtc today -7d
dtc 21.04.2024 20w
- possibility to specify output format
- allow different input formats
- use the same output format as default which was used for the input
- better error messages (for example if the time format parsing from time doesn't work, how to pass the value on to nom?)
- use proptest for testing
- test coverage badge in readme
- version badge in readme
- extract core functionality into lib
- allow spaces in duration (in the cmd the string has to be
"
-escaped in this case e.g."20m 10s"
)