Re: Some of Ron's Code?
- From: Ken Tilton <kentilton@xxxxxxxxx>
- Date: Thu, 07 Dec 2006 08:50:55 -0500
Bruce O'Neel wrote:
Ken Tilton <kentilton@xxxxxxxxx> writes:
<snip>
...they fly across month boundaries (I am guessing, but I would die
laughing if it turns out they actually avoid that, too) and apparently
are doing /some/ calculations that will break by crossing a year
boundary, so it seems like they know about going from 28, 29, 30, and
31 to 1 so a year rollover (if (month==12)...) -- what? another three
lines of code?
A lot of these sorts of calculations in the ESA ground station world
are YYYYDDD, ie, year and day of year.
Yes, with the benefit of a night's sleep I am able to notice:
"On Jan. 1, 2007, the computer will think it is the 366th day of 2006."
So the code days:
++day;
and should read:
if (day == (365 + (mod(year,4)==0))) {
++year;
day = 1;
} else ++day;
Sh*t, they could hardcode the leap leap year.
kt
--
Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm
"Well, I've wrestled with reality for thirty-five
years, Doctor, and I'm happy to state I finally
won out over it." -- Elwood P. Dowd
"I'll say I'm losing my grip, and it feels terrific."
-- Smiling husband to scowling wife, New Yorker cartoon
.
- Follow-Ups:
- Re: Some of Ron's Code?
- From: Ari Johnson
- Re: Some of Ron's Code?
- From: Paul Wallich
- Re: Some of Ron's Code?
- From: Frank Buss
- Re: Some of Ron's Code?
- References:
- Some of Ron's Code?
- From: Ken Tilton
- Re: Some of Ron's Code?
- From: Jim
- Re: Some of Ron's Code?
- From: Ken Tilton
- Re: Some of Ron's Code?
- From: Jim
- Re: Some of Ron's Code?
- From: Ken Tilton
- Re: Some of Ron's Code?
- From: Bruce O'Neel
- Some of Ron's Code?
- Prev by Date: Re: Future of LISP. Alternative to XML. Web 3.0?
- Next by Date: Re: help persuading/reassuring a client that I should use Lisp
- Previous by thread: Re: Some of Ron's Code?
- Next by thread: Re: Some of Ron's Code?
- Index(es):
Relevant Pages
|