j t wrote:
Hi all. Does anyone have any suggestions for a command-line-interface (CLI) calculator that can work out the difference between 2 (gregorian) dates (i.e. that is calendar aware). My favourite cli calculator ("bc") doesn't seem to have any knowledge of the gregorian calendar. Just to make it clear, I'd like to be able to type in: 20080824-20080724 and it would work out the answer as 31 (I'm happy to use any date format for input - I've only used ISO8601 as an example)
I Googled "date arithmetic", and found this, http://www.walkernews.net/2007/06/03/date-arithmetic-in-linux-shell-scripts/
Can you adapt from that? cheers, gary -- Anyone can make a usable web site. It takes a graphic designer to make it slow, confusing and painful to use.
begin:vcard fn:Gary Turner n:Turner;Gary org:Gary Turner, Web Developer adr:;;;;;;USA email;internet:gary.kk5st@gmail.com title:Czar x-mozilla-html:FALSE url:http://gtwebdev.com/ version:2.1 end:vcard