diff --git a/matlab/utilities/dates/isdate.m b/matlab/utilities/dates/isdate.m index 82c02d840..ebcd2816e 100644 --- a/matlab/utilities/dates/isdate.m +++ b/matlab/utilities/dates/isdate.m @@ -25,7 +25,11 @@ function b = isdate(str) % --*-- Unitary tests --*-- % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . -b = isquaterly(str) || isyearly(str) || ismonthly(str) || isweekly(str); +if length(str)>1 + b = isquaterly(str) || isyearly(str) || ismonthly(str) || isweekly(str); +else + b = 0; +end %@test:1 %$