diff --git a/matlab/utilities/dates/isdate.m b/matlab/utilities/dates/isdate.m index 2fb603803..67bfcdb2d 100644 --- a/matlab/utilities/dates/isdate.m +++ b/matlab/utilities/dates/isdate.m @@ -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 . -%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 %$