----- Original Message ----- 
From: "Mark J. Reed" <markjreed / mail.com>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Thursday, August 07, 2003 1:06 PM
Subject: Re: 99 days...


> On Fri, Aug 08, 2003 at 01:42:34AM +0900, Hal E. Fulton wrote:
> > By my crude calculations, it is now 99 days until the
> > third annual international Ruby Conference in Austin,
> > Texas, November 14-16, 2003.
> 
> No need to be crude when you have Ruby. :)
> 
> $ ruby -r date -e 'puts Date.new(2003,11,14) - Date.new(2003,8,8)'
> 98
> $
> 
> Of course, it really is 99 days for those of us who are still in 
> Thursday. :)

Well, it's the same amount of time regardless of where you 
are... ;) Give or take a few nanoseconds... time dilation 
is not much at subsonic speeds.

My code was as follows... crudeness comes when you
don't know the precise instant the conference starts.

  t0 = Time.mktime(2003,11,14,19,0,0)   # 7 pm?
  t1 = Time.now

  days = (t0 - t1)/86400.0
  puts "#{days} days"

<offtopic mode="anecdotage">
Ahh, this reminds me of when I was in college and wrote 
the program to calculate the number of seconds until 
graduation... inspired of course by Lazarus Long's cadet 
days in _Time Enough for Love_, which I read when I was 14.
</offtopic>

Cheers,
Hal

--
Hal Fulton
hal9000 / hypermetrics.com