Convert MATLAB datetime to Julian date
d = juliandate(
returns the Julian dates equivalent to the t
)datetime
values in
t
.
If the time zone of t
is not specified, then
juliandate
treats the times in t
as UTC times. This interpretation might differ from your treatment of
“unzoned” datetime
arrays in other
contexts. For example, you might think of datetime('now')
as returning your local time. However, juliandate
interprets it as a UTC time.
If the time zone of t
is specified, then
juliandate
uses the offset for the time zone to
compute Julian dates with respect to UTC.
juliandate
ignores leap seconds unless the time zone of
t
is UTCLeapSeconds
.
The best practice is to specify the time zone of t
before
calling juliandate
.