| Aerospace Toolbox | ![]() |
jd = juliandate(v)
jd = juliandate(s,f)
jd = juliandate(y,mo,d)
jd = juliandate([y,mo,d])
jd = juliandate(y,mo,d,h,mi,s)
jd = juliandate([y,mo,d,h,mi,s])
jd = juliandate(v) converts one or more date vectors, v, into Julian date, jd. Input v can be an m-by-6 or m-by-3 matrix containing m full or partial date vectors, respectively. juliandate returns a column vector of m Julian dates, which are the number of days and fractions since noon Universal Time on January 1, 4713 BCE.
A date vector contains six elements, specifying year, month, day, hour, minute, and second. A partial date vector has three elements, specifying year, month, and day. Each element of v must be a positive double-precision number.
jd = juliandate(s,f) converts one or more date strings, s, into Julian date, jd, using format string f. s can be a character array where each row corresponds to one date string, or a one-dimensional cell array of strings. juliandate returns a column vector of m Julian dates, where m is the number of strings in s.
All of the date strings in s must have the same format f, which must be composed of date format symbols listed in the datestr function reference page. Formats containing the letter Q are not accepted by juliandate.
Certain formats may not contain enough information to compute a date number. In those cases, hours, minutes, and seconds default to 0, days default to 1, months default to January, and years default to the current year. Date strings with two-character years are interpreted to be within the 100 years centered around the current year.
jd = juliandate(y,mo,d) and jd = juliandate([y,mo,d]) return the decimal year for corresponding elements of the y,mo,d (year,month,day) arrays. y, mo, and d must be arrays of the same size (or any of them can be a scalar).
jd = juliandate(y,mo,d,h,mi,s) and jd = juliandate([y,mo,d,h,mi,s]) return the Julian dates for corresponding elements of the y,mo,d,h,mi,s (year,month,day,hour,minute,second) arrays. The six arguments must be arrays of the same size (or any of them can be a scalar).
Calculate Julian date for May 24, 2005:
jd = juliandate('24-May-2005','dd-mmm-yyyy')
jd =
2.4535e+006Calculate Julian date for December 19, 2006:
jd = juliandate(2006,12,19) jd = 2.4541e+006
Calculate Julian date for October 10, 2004, at 12:21:00 p.m.:
jd = juliandate(2004,10,10,12,21,0) jd = 2.4533e+006
This function is valid for all common era (CE) dates in the Gregorian calendar.
The calculation of Julian date does not take into account leap seconds.
decyear, leapyear, mjuliandate
![]() | initIfNeeded (Aero.Animation) | leapyear | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |