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

Home » Public Forums » archive » How to convert Julian date into Gregorian date format in IDL?
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: How to convert Julian date into Gregorian date format in IDL? [message #89730 is a reply to message #89728] Thu, 20 November 2014 14:59 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
mick.mitanirc3@gmail.com writes:

>
> I think the disconnect here is between Julian Date and Julian Day of Year (DOY).
>
> Mr. Hasan's value of 213 is a Julian Day of Year value, in this case 213 days into year 2010. Systime with the /Julian flag returns the Julian Date value - the number of seconds elapsed since 00:00:00 Jan 1 1970 UTC (commonly called the Unix or POSIX Epoch).
>
> The military often use Julian DOY in the form of YYYYDOY or YYDOY and unfortunately usually call the result a Julian Date which wasn't a problem until us programmers came around with our date/time functions.
>
> The JHU library function I mentioned in my first reply works with Julian DOY.

I just want to point out that the built-in Julday function (in
conjunction with CalDat) can also handle the Day of Year number.

IDL> date = 2007118L
IDL> year = Fix(StrMid(StrTrim(date,2), 0, 4))
IDL> dayofyear = Fix(StrMid(StrTrim(date,2), 4, 3))
IDL> CALDAT, JULDAY(1, dayofyear, year), month, day
IDL> Print, month, day
4 28

You can learn more here:

http://www.idlcoyote.com/code_tips/dayofyear.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[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
Previous Topic: Reversing y-axis using label_date
Next Topic: gray-level co-occurrence matrix (GLCM)

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

Current Time: Fri Oct 10 09:17:59 PDT 2025

Total time taken to generate the page: 0.79939 seconds