On Sun, 2008-08-24 at 11:25 -0500, Ron Johnson wrote:
On 08/24/08 10:54, Edward J. Shornock wrote:
[snip]
While I'm sure someone else will provide a much better way, I've used
something like
$ echo $(date -d 20080824 +%j) - $(date -d 20080724 +%j) | bc
31
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
30
Use delta from epoch, instead.
$ echo $[$(date -d 20090824 +%s) - $(date -d 20080724 +%s)]/86400|bc
396
Why the "/86400"? I follow all of the above but that operation and number.