Code covered by the BSD License  

Highlights from
julian2greg

5.0

5.0 | 1 rating Rate this file 9 Downloads (last 30 days) File Size: 2.02 KB File ID: #11410

julian2greg

by Gabriel Ruiz

 

14 Jun 2006 (Updated 14 Jun 2006)

This function converts the Julian dates to Gregorian dates.

| Watch this File

File Information
Description

0. Syntax:
[day,month,year,hour,min,sec,dayweek] = julian2greg(JD)

1. Inputs:
JD = Julian date.

2. Outputs:
year, month, day, dayweek = date in Gregorian calendar.
hour, min, sec = time at universal time.

3. Example:
>> [a,b,c,d,e,f,g,h] = julian2greg(2453887.60481)
a =
2006
b =
6
c =
1
d =
2
e =
30
f =
56
g =
Thursday
h =
1 6 2006 2 30 56

4. Notes:
- For all common era (CE) dates in the Gregorian calendar.
- The function was tested, using the julian date converter of U.S. Naval Observatory and the results were similar. You can check it.
Trying to do the life... more easy with the conversions.

5. Referents:
Astronomical Applications Department. "Julian Date Converter". From U.S. Naval Observatory. http://aa.usno.navy.mil/data/docs/JulianDate.html
Duffett-Smith, P. (1992). Practical Astronomy with Your Calculator. Cambridge University Press, England: pp. 8,9.

Gabriel Ruiz.
Jun-2006

Acknowledgements
This submission has inspired the following:
GUI - Calender Convertor
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
13 Apr 2011 Rafael Cortez

the correct output is
[year,month,day,hour,min,sec,dayweek]

syntax is wrong

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
clock Gabriel Ruiz 22 Oct 2008 08:29:39
fun Gabriel Ruiz 22 Oct 2008 08:29:39
julian date Gabriel Ruiz 22 Oct 2008 08:29:39
dates Gabriel Ruiz 22 Oct 2008 08:29:39
gregorian date Gabriel Ruiz 22 Oct 2008 08:29:39
julian date tstmwind 24 Nov 2008 13:40:09

Contact us at files@mathworks.com