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

Home » Public Forums » archive » Re: days of the week
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: days of the week [message #29836] Thu, 21 March 2002 09:01 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Mark Hadfield" <m.hadfield@niwa.co.nz> writes:

> "Craig Markwardt" <craigmnet@cow.physics.wisc.edu> wrote in message
> news:ong02v434v.fsf@cow.physics.wisc.edu...
>
>> P.S. I think the built-in JULDAY function is the one of the most
>> dangerous function I have ever seen. It measures *calendar dates*
>> from *noon* by gosh!
>
> I couldn't agree more.
>
>> It also doesn't handle fractional days...
>
> Not true in recent versions...
>
> IDL> print, julday(03,21,2002)
> 2452355
> IDL> print, julday(03,21,2002,10,23,30)
> 2452354.9
>
> But that weird argument order (month, day, year, ...) is what I
> *really* hate.

That is true, and the irony here is that JULDAY came from Numerical
Recipes, and other criticisms about code quality aside, those NR guys
are *astronomers* gosh darnit!

The following is totally unintuitive to me:

IDL> print, julday(3d,21d,2002d), format='(D30.3)'
2452355.000
;; Now, how about "one second" later
IDL> print, julday(3d,21d,2002d,00d,00d,01d), format='(D30.3)'
2452354.500

It's because in one case the calendar dates are measured from noon,
and in the other they are measured from midnight.

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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
Previous Topic: A little handy date function
Next Topic: Re: IDL Movie Viewer

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

Current Time: Wed Oct 08 14:52:16 PDT 2025

Total time taken to generate the page: 0.00438 seconds