Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 dates

USAGE:
date-diff [OPTIONS]

ARGS:
Date formats: yyyy-mm-dd or yyyy/mm/dd
Date formats: yyyy-mm-dd or yyyy/mm/dd

OPTIONS:
-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