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

dennis2 (Dennis)
Something like:


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

2001-7-10 -04:00

回到话题: I came across this post in chinasmile. Nobody has answered his question yet. I couldn't figure out a way to do it with shell scripts, although

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论