changeset 834 | 31202b672717 |
parent 828 | 235bf6715fc6 |
child 848 | 748e1e894339 |
--- a/.bashrc Mon Feb 20 14:20:06 2017 +0200 +++ b/.bashrc Tue Feb 21 10:06:40 2017 +0200 @@ -213,7 +213,7 @@ datediff() { [[ -n "$1" ]] || { echo first argument is missing; return 1; } [[ -n "$2" ]] || { echo second argument is missing; return 1; } - local diff=$(( $(date -d "$2" +%s) - $(date -d "$1" +%s) )) + local diff=$(( $(date -d "$1" +%s) - $(date -d "$2" +%s) )) local sec=$(( diff % 60 )) diff=$(( diff / 60 )) local min=$(( diff % 60 ))