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

Home » Public Forums » archive » Day of Year... Too lazy for a two-line solution...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Day of Year... Too lazy for a two-line solution... [message #62105] Fri, 22 August 2008 11:49
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
Hi IDL Wizards,

I handle all date manipulation in my routines using JULDAY(), CALDAT,
and the C() format code. Going from Day-of-Year to Julian Date is
easy:

Julian_Date = JULDAY(1,Day_Of_Year,Year,0,0,0)

Getting Day-of-Year back out requires this, *unless you can do
better*:

CALDAT,Julian_Date,Null,Null,Year
Day_Of_Year = Julian_Date - JULDAY(12,31,Year-1,0,0,0)

I would really like a one-line solution with no stray variables.
Anyone have one?

--Edward H.
[Message index]
 
Read Message
Previous Topic: strange behaviour of SOCKET
Next Topic: Re: Day of Year... Too lazy for a two-line solution...

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

Current Time: Fri Oct 10 15:53:17 PDT 2025

Total time taken to generate the page: 1.51957 seconds