function c = minus(a,b)
%@info:
%! @deftypefn {Function File} {@var{c} =} minus (@var{a},@var{b})
%! @anchor{@dynDate/minus}
%! @sp 1
%! Overloads the minus (soustraction) operator for the Dynare dates class (@ref{dynDate}). Depending on the frequency, computes the number
%! of years, quarters, months, weeks between two dates @var{a} and @var{b} (it is assumed that @var{a}>@var{B}).
%! @sp 2
%! @strong{Inputs}
%! @sp 1
%! @table @ @var
%! @item a
%! Dynare date object instantiated by @ref{dynDate}.
%! @item b
%! Dynare date object instantiated by @ref{dynDate}.
%! @end table
%! @sp 1
%! @strong{Outputs}
%! @sp 1
%! @table @ @var
%! @item c
%! Integer scalar, the number of years, quarters, months or weeks between @var{a} and @var{B}.
%! @end table
%! @sp 2
%! @strong{This function is called by:}
%! @sp 2
%! @strong{This function calls:}
%! @ref{@@dynDate/eq},@ref{@@dynDate/lt}
%!
%! @end deftypefn
%@eod:
% Copyright (C) 2011 Dynare Team
% stephane DOT adjemian AT univ DASH lemans DOT fr
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see .
if ~( isa(a,'dynDate') && isa(b,'dynDate') )
error(['dynDate::minus: Input arguments ' inputname(1) ' and ' inputname(2) ' must be dynDate objects!'])
end
if a.freq~=b.freq
error(['dynDate::minus: ' inputname(1) ' and ' inputname(2) ' must have common frequency!'])
end
if a