-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmjd20002date.m
More file actions
42 lines (38 loc) · 1.38 KB
/
Copy pathmjd20002date.m
File metadata and controls
42 lines (38 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function date = mjd20002date(mjd2000)
%MJD20002DATE Gregorian calendar date from modified Julian day 2000 number.
%
% DATE = MJD20002DATE(MJD2000) returns the Gregorian calendar date
% (year, month, day, hour, minute, and second) corresponding to the
% modified Julian day 2000 number.
%
% Note: Since this function calls jd2date, MJD2000 cannot be less than
% -2451545, that is 24 November -4713, 12:00 noon, Gregorian
% proleptic calendar.
%
% INPUT
% mjd2000 Date in MJD 2000. MJD2000 is defined as the number of days
% since 01-01-2000, 12:00 noon. It must be a real greater or
% equal than -2451545.
%
% OUTPUT
% date Date in the Gregorian calendar, as a 6-element vector
% [year, month, day, hour, minute, second]. For dates before
% 1582, the resulting date components are valid only in the
% Gregorian proleptic calendar. This is based on the
% Gregorian calendar but extended to cover dates before its
% introduction.
%
% See also DATE2MJD2000.
%
% FUNCTIONS CALLED
% MJD20002JD
% JD2DATE
%
% - Nicolas Croisard - 16/02/2008
% - Revised by Matteo Ceriotti - 21/02/2008
%
% ------------------------- - SpaceART Toolbox - --------------------------
% Compute the year month and day
jd = mjd20002jd(mjd2000);
date = jd2date(jd);
return