comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Julian Day Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Julian Day Question [message #48868 is a reply to message #48867] Fri, 26 May 2006 10:05 Go to previous messageGo to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
"Paul Van Delst" <Paul.vanDelst@noaa.gov> wrote in message
news:e57e90$6ri$1@news.nems.noaa.gov...
> Why does providing the ",0,0,0" hh,mm,ss data cause the start reference to
> suddenly shift by 12 hours?

Yes, that is exactly the problem. The function breaks one of the fundamental
tenets of software programming. It does 2 different things (depending on
the input).
1) convert to julian day (noon based)
2) (a) convert to julian day and (b) convert to midnight based
Hence my suggestion to hardwire the function to always perform one function.

I propose that always inputting the h:m:s and forcing the result to return
the midnight
based julian day, which is what i do in my little library of time functions.

Cheers,
bob

PS I should admit that I almost always break this tenet of programming.
I write routines that are overloaded to "do what you want it to" :O
But then again, I am a hack :)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Performance Issues going to IDL 6.2 on Windows?
Next Topic: Re: Problems with the Windows IDE

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:36:44 PDT 2025

Total time taken to generate the page: 0.00377 seconds