about dates, comparing and calculation

Hi,

can we do date comparisons in unix? like if i give the two dates find which date is old one and which is new one and difference between the two dates in terms of hours,minutes,days and months.

http://www.unix.com/answers-frequently-asked-questions/13785-yesterdays-date-date-arithmetic.html