Since

Since what?

14:30:29 risto@GALACTICA /home/risto> ↪ since 13:00 1 hours and 30 minutes

Semantic CLI utility for calculating time differences

``` ↪ since -h since v0.11.0

Fetch time difference between and .

If no parameters are given, will return time since UNIX epoch. Missing argument will always default to current datetime. All subcommands share exactly the same functionality and arguments as base command, just filtering the output to different format.

All values are generally rounded down.

USAGE: since [ARGS] since

FLAGS: -h, --help Prints help information -V, --version Prints version information

ARGS: Start time or date. End time or date, for custom range. Default is current datetime.

SUBCOMMANDS: years Print the output in years (approx) months Print the output in months (approx) weeks Print the output in weeks (approx) days Print the output in days hours Print the output in hours minutes Print the output in minutes seconds Print the output in seconds ```

Supported date & time formats

All formats are hard-coded and chosen with the loose criteria of "what makes sense", the goal is to be intuitive, not exhaustive (yet).

Time

Date

Datetime

Notes on functionality

Examples

```sh ↪ date Mon 8 Jun 10:12:14 EEST 2020

The original usecase, shorthand time calculations

↪ since 7:00 3 hours and 12 minutes

↪ since 24.12.2019 6 months

↪ since 24-12-2012T16:00:00 8 years

Explicit time output formats

↪ since hours 7:00 3

↪ since minutes 7:00 192

↪ since days 7:00 0

↪ since days 24.12.2019 166

↪ since months 24.12.2019 6

↪ since years 24.12.2002 18

Custom time ranges with explicit second parameter

↪ since minutes 14:00 23:45 585

Mixing parameter formats

↪ since hours "24 December 2019 18:15:30" 2020-6-20 4286

Unix epochs

↪ since 1591600334

↪ since minutes 26526672

↪ since years 50 ```

Build

git clone https://github.com/ryyst/since.git cd since cargo build --release

Now you can find the binary in ./target/release/since

Todo