Re: DAY OF YEAR [message #17461 is a reply to message #17459] |
Mon, 25 October 1999 00:00  |
Ben Tupper
Messages: 186 Registered: August 1999
|
Senior Member |
|
|
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Howdy,
<p>Haje Korth wrote:
<blockquote TYPE=CITE>Hi folks,
<br>Sometimes RSI is driving me nuts with introducing new stuff and making
<br>old stuff obsolete.
<br>Can anybody tell me with their new date/time format code, how to print
<br>the day of the year (doy). It should be something like:
<br>a=julday(month,day,year,hour,min,sec)
<br>print,a,format='(c(???????))'
<br> </blockquote>
You could calculate the DOY with the following.
<p>IDL> Today = JulDay(10,26,1999)
<br>IDL> BenchMark = JulDay(1,1,1999)
<br>IDL> print,Today-BenchMark
<br> 298
<p>Note that this DOY implies that Jan 1 is D0Y 0... which is ok for somefolks
but not others. I can't think of the need for it, but sometimes
the first DOY is considered DOY 1. (Just when I was getting
used to counting from Zero and having only nine fingers!)
<br>
<pre>--
Ben Tupper
Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org
Pemaquid River Company
pemaquidriver@tidewater.net</pre>
</html>
|
|
|