2022-02-09 07:29:05 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
time="$*"
|
|
|
|
[[ -z "$time" ]] && echo "usage: $0 TIME (see date -d)" && exit 1
|
|
|
|
start=$(date "+%s" -d "$time")
|
|
|
|
now=$(date "+%s")
|
2022-03-06 23:09:46 +00:00
|
|
|
declare -i secs=$((now-start))
|
2022-02-09 07:29:05 +00:00
|
|
|
sec2dur "$secs"
|