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

Home » Public Forums » archive » Converting days since 0-01-01 to Julian/Gregorian days - how can IDL recognise 0 AD?
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: Converting days since 0-01-01 to Julian/Gregorian days - how can IDL recognise 0 AD? [message #89445 is a reply to message #89398] Fri, 17 October 2014 03:39 Go to previous message
Valeri Golev is currently offline  Valeri Golev
Messages: 1
Registered: October 2014
Junior Member
07 октомври 2014, вторник, 16:21:47 UTC+3, Jasdeep Anand написа:
> I have data which has been given timestamps with the units: "days since 0-01-01 00:00", which I'm assuming means since January 1st, 0 AD. I'd like to convert this into a format I can actually use, preferably Julian days so IDL can recognise the date format when plotting.
>
>
>
> From what I understand I can't use any of the default IDL programs for this task (JULDAY, GREG2JUL, etc) because of the fact that the year 0 AD doesn't exist (IDL's calendar instead goes straight from -1 to 1 to conserve leap years).
>
>
>
> What should I do? I'm unsure of the timestamps used to calculate the data (all I have is the year and month) and I'll be comparing this with data from a separate dataset which does not have this problem. I don't think I can use -1 or 1 in this case as the year because the final Julian day will be wrong. Has anyone encountered this problem at all?
>
>
>
> Thanks,
>
>
>
> J. Anand

Please, check

IDL> print, JULDAY(1, 1, 1, 0, 0, 0) ; Jan 01, 1 AD
1721423.5
IDL> print, JULDAY(12, 31, -1, 0, 0, 0); Dec 31, 1 BD
1721422.5

As you can see, the difference is exactly one day. It happens because there the year 0 AD in the calendar does not exists by definition!

Don't worry about .5 fraction, it comes from old astronomical tradition (Julian days start at noon).

Cheers,

Valeri
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Read ASCII time format question!!
Next Topic: non-rectangular array subset

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

Current Time: Wed Oct 08 17:46:36 PDT 2025

Total time taken to generate the page: 0.00609 seconds