×

Loading...

I can do it easily with FSF's date, but I can't figure out how to do it using *BSD's date

Something like:

#!/bin/sh

s1=`date -d $1 +%s`
s2=`date -d $2 +%s`
day=$((($s2 - $s1)/3600/24))
echo "Days: " $day
Report