Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mesalilac/date-diff
Command line tool to calculate the difference between two dates
https://github.com/mesalilac/date-diff
cli date date-difference datetime rust rust-cli rust-lang
Last synced: about 1 month ago
JSON representation
Command line tool to calculate the difference between two dates
- Host: GitHub
- URL: https://github.com/mesalilac/date-diff
- Owner: mesalilac
- Created: 2022-05-02T03:14:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-02T05:08:32.000Z (over 2 years ago)
- Last Synced: 2024-05-06T06:21:42.807Z (8 months ago)
- Topics: cli, date, date-difference, datetime, rust, rust-cli, rust-lang
- Language: Rust
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# date-diff
Command line tool to calculate the difference between two dates
## Install
```
git clone
cd date-diff
cargo install --path .
```## Usage
```
$ date-diff 1970-1-1 2022-5-2
```output
```
years: 52, months: 627, weeks: 2730, days: 19114, hours: 458736, minutes: 27524160, seconds: 1651449600
```### Help
```
Calculate the difference between two datesUSAGE:
date-diff [OPTIONS]ARGS:
Date formats: yyyy-mm-dd or yyyy/mm/dd
Date formats: yyyy-mm-dd or yyyy/mm/ddOPTIONS:
-d, --days
-h, --hours
--help Print help information
-m, --months
-M, --minutes
-s, --seconds
-V, --version Print version information
-w, --weeks```
## todo
- [ ] Code clean up