Modified isdate behaviour (an integer scalar is interpreted as a year).

time-shift
Stéphane Adjemian (Charybdis) 2014-06-13 10:10:17 +02:00
parent af1009d8a4
commit e41e8effdf
1 changed files with 6 additions and 5 deletions

View File

@ -25,11 +25,12 @@ function b = isdate(str) % --*-- Unitary tests --*--
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
%if length(str)>1
b = isquaterly(str) || isyearly(str) || ismonthly(str) || isweekly(str);
%else
%b = 0;
%end
if isnumeric(str) && isscalar(str)
b = 1;
return
end
b = isquaterly(str) || isyearly(str) || ismonthly(str) || isweekly(str);
%@test:1
%$