Thanks, actually you can use awk to parser the date. Where can you get FSF's date utility? I never heard of it. And should you use expr in the second last line when you try to evaluate ($s1-s2)/3600/24?
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