Home > freetb4matlab > time > datenum.m

datenum

PURPOSE ^

% Returns the specified local time as a day number, with Jan 1, 0000

SYNOPSIS ^

function [days, secs] = datenum (Y, M, D, h, m, s)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} datenum (@var{year}, @var{month}, @var{day})
% @deftypefnx {Function File} {} datenum (@var{year}, @var{month}, @var{day}, @var{hour})
% @deftypefnx {Function File} {} datenum (@var{year}, @var{month}, @var{day}, @var{hour}, @var{minute})
% @deftypefnx {Function File} {} datenum (@var{year}, @var{month}, @var{day}, @var{hour}, @var{minute}, @var{second})
% @deftypefnx {Function File} {} datenum (@code{'date'})
% @deftypefnx {Function File} {} datenum (@code{'date'}, @var{p})
% Returns the specified local time as a day number, with Jan 1, 0000
% being day 1.  By this reckoning, Jan 1, 1970 is day number 719529.  
% The fractional portion, @var{p}, corresponds to the portion of the
% specified day.
%
% Notes:
%
% @itemize
% @item
% Years can be negative and/or fractional.
% @item
% Months below 1 are considered to be January.
% @item
% Days of the month start at 1.
% @item
% Days beyond the end of the month go into subsequent months.
% @item
% Days before the beginning of the month go to the previous month.
% @item
% Days can be fractional.
% @end itemize
%
% @strong{Warning:} this function does not attempt to handle Julian
% calendars so dates before Octave 15, 1582 are wrong by as much
% as eleven days.  Also be aware that only Roman Catholic countries
% adopted the calendar in 1582.  It took until 1924 for it to be 
% adopted everywhere.  See the Wikipedia entry on the Gregorian 
% calendar for more details.
%
% @strong{Warning:} leap seconds are ignored.  A table of leap seconds
% is available on the Wikipedia entry for leap seconds.
% @seealso{date, clock, now, datestr, datevec, calendar, weekday}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003