source: altifloat/matlab_toolbox/date2mjd.m @ 160

Last change on this file since 160 was 129, checked in by jbrlod, 10 years ago

last version of Varanth

  • Property svn:executable set to *
File size: 810 bytes
Line 
1function mjd = date2mjd(varargin)
2%DATE2MJD Modified Julian day number.
3%
4%   MJD = DATE2MJD(YEAR, MONTH, DAY, HOUR, MINUTE, SECOND) returns the
5%   modified Julian day number of the given date plus a fractional part
6%   depending on the day and time of day.
7%
8%   Any missing MONTH or DAY will be replaced by ones.  Any missing HOUR,
9%   MINUTE or SECOND will be replaced by zeros.
10%
11%   If no date is specified, the current date and time is used.  Gregorian
12%   calendar is assumed.
13%
14%   Start of the MJD (modified Julian day) count is from 0 at 00:00 UTC 17
15%   November 1858 (Gregorian calendar).
16
17%   Author:      Peter John Acklam
18%   Time-stamp:  2002-03-03 12:52:13 +0100
19%   E-mail:      pjacklam@online.no
20%   URL:         http://home.online.no/~pjacklam
21
22   mjd = date2jd(varargin{:}) - 2400000.5;
Note: See TracBrowser for help on using the repository browser.