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

Home » Public Forums » archive » Re: convert from Julian date to calendar date and vice verse
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: convert from Julian date to calendar date and vice verse [message #80704] Fri, 06 July 2012 10:56 Go to next message
k_ghreep is currently offline  k_ghreep
Messages: 19
Registered: May 2012
Junior Member
On Jul 4, 5:19 pm, wlandsman <wlands...@gmail.com> wrote:
> Stefan,  Sorry I misinterpreted your post.      You didn't say that daycnv.pro had the wrong zero point, but that numbers given by the OP were not Julian dates since they had the wrong zero point.
>
> Khaled, to convert your numbers to Julian day you need to add JULDAY(1,1,1) = 1721424 to all your dates.      But are you sure that your numbers are not *hours* rather than days since 1-1-1?     If it is days then they refer to a year far in the future, but if they are hours then they refer to the year 2012.
>
> --Wayne
>
>
>
>
>
>
>
> On Tuesday, July 3, 2012 7:15:44 PM UTC-4, wlandsman wrote:
>> My posts from a few hours ago don't seem to have shown up -- sorry if they appear twice
>
>> daycnv.pro does not have the wrong zero point.    It converts to Gregorian (not Julian) calendar day, and JD 0.0 corresponds to November 24 4713 BC in the Gregorian calendar.
>
>> ( e.g.http://www.hermetic.ch/cal_stud/jdn.htm#comp).    Cheers, --Wayne

Hi Stefan and Wladsman
Thanks a lot for your efforts. I have got some fact for my date.
in fact all of the times are double values which represent the number
of days or hours from an origin date. I have got a units attribute for
the time variable that is considered the key to decoding the time
values. For example, my date have time units of "days since 1-1-1
00:00:0.0". With those units, an encoded value of 725738. would be the
value for the calendar date 1988-01-01.
I would like to convert my dates to readable times and vice versa. a
readable times means a calendar date in a form say 2012-010-25.
thanks in advance

Khaled
Re: convert from Julian date to calendar date and vice verse [message #80727 is a reply to message #80704] Tue, 03 July 2012 05:35 Go to previous messageGo to next message
k_ghreep is currently offline  k_ghreep
Messages: 19
Registered: May 2012
Junior Member
On Jul 3, 12:32 pm, Stefan <stefan.meing...@gmail.com> wrote:
> Am Montag, 2. Juli 2012 15:21:45 UTC+2 schrieb (unbekannt):
>
>> Dear all,
>
>> I have the following time units of "days since 1-1-1 00:00:0.0".
>> 17619336.       17619360.       17619384.       17619408.
>> 17619432.       17619456.       17619480.       17619504.
>> 17619528.       17619552.       17619576.       17619600.
>
>> I would like to convert them from  Julian date to calendar date and
>> vice verse.
>> thanks in advance
>> Khaled
>
> you could use this:
>
> http://idlastro.gsfc.nasa.gov/ftp/pro/astro/daycnv.pro
>
> but be aware that your dates are not Julian dates since the zero-point is wrong. The ZP for the JD is
>
> 12:00 January 1, 4713 BC, Monday
>
> and you will have to convert to this before you perform the conversion.

Hi Stefan,
I had tested your code for the following Julian day 17619600.D using
the following command
DAYCNV, 17628072.D, yr, mn, day, hr
I had got the following calendar date

43551 12 3 12.000000
please note that the time unit of "days since 1-1-1 00:00:0.0". how to
calculate the year in calender format?
Best wishes
Khaled
Re: convert from Julian date to calendar date and vice verse [message #80793 is a reply to message #80704] Sun, 08 July 2012 09:27 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
daycnv,725738+julday(1,1,1),yr,mn,day & print,yr,mn,day
1988 1 1


On Friday, July 6, 2012 1:56:33 PM UTC-4, (unknown) wrote:
For example, my date have time units of "days since 1-1-1
> 00:00:0.0". With those units, an encoded value of 725738. would be the
> value for the calendar date 1988-01-01.
> I would like to convert my dates to readable times and vice versa. a
> readable times means a calendar date in a form say 2012-010-25.
> thanks in advance
>
> Khaled
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: (more) Efficient way to generate an array whose elements are the distance from the center
Next Topic: include COI on wavelet plots using toolkit

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

Current Time: Wed Oct 08 11:33:16 PDT 2025

Total time taken to generate the page: 0.00552 seconds