Command-line-interface (CLI) calculator to work out the difference between 2 dates
On 08/24/08 10:54, Edward J. Shornock wrote:
While I'm sure someone else will provide a much better way, I've used
$ echo $(date -d 20080824 +%j) - $(date -d 20080724 +%j) | bc
That a good idea. I never knew date(1) could do that. The problem,
though, is that it doesn't span years.
$ echo $(date -d 20090824 +%j) - $(date -d 20080724 +%j) | bc
Use delta from epoch, instead.
$ echo $[$(date -d 20090824 +%s) - $(date -d 20080724 +%s)]/86400|bc
Ron Johnson, Jr.
Jefferson LA USA
"Do not bite at the bait of pleasure till you know there is no
hook beneath it." -- Thomas Jefferson
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact email@example.com