Commit 18e68049 authored by Houtan Bastani's avatar Houtan Bastani

fix typo in isquarterly. closes #10

parent 68483930
......@@ -30,7 +30,7 @@ if isyearly(a)
return
end
if isquaterly(a)
if isquarterly(a)
year = 1:(regexp(a,'[Qq]')-1);
date.freq = 4;
date.time = write_time_field(a, year);
......
function b = isquaterly(str) % --*-- Unitary tests --*--
function b = isquarterly(str) % --*-- Unitary tests --*--
% Tests if the input can be interpreted as a quaterly date.
% Tests if the input can be interpreted as a quarterly date.
%
% INPUTS
% o str string.
%
% OUTPUTS
% o b integer scalar, equal to 1 if str can be interpreted as a quaterly date or 0 otherwise.
% o b integer scalar, equal to 1 if str can be interpreted as a quarterly date or 0 otherwise.
% Copyright (C) 2012-2017 Dynare Team
%
......@@ -45,12 +45,12 @@ end
%$ date_6 = '1950Y';
%$ date_7 = '1950m24';
%$
%$ t(1) = dassert(isquaterly(date_1),true);
%$ t(2) = dassert(isquaterly(date_2),true);
%$ t(3) = dassert(isquaterly(date_3),true);
%$ t(4) = dassert(isquaterly(date_4),false);
%$ t(5) = dassert(isquaterly(date_5),false);
%$ t(6) = dassert(isquaterly(date_6),false);
%$ t(7) = dassert(isquaterly(date_7),false);
%$ t(1) = dassert(isquarterly(date_1),true);
%$ t(2) = dassert(isquarterly(date_2),true);
%$ t(3) = dassert(isquarterly(date_3),true);
%$ t(4) = dassert(isquarterly(date_4),false);
%$ t(5) = dassert(isquarterly(date_5),false);
%$ t(6) = dassert(isquarterly(date_6),false);
%$ t(7) = dassert(isquarterly(date_7),false);
%$ T = all(t);
%@eof:1
\ No newline at end of file
......@@ -26,7 +26,7 @@ function b = isstringdate(str) % --*-- Unitary tests --*--
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if ischar(str)
b = isquaterly(str) || isyearly(str) || ismonthly(str) || isweekly(str);
b = isquarterly(str) || isyearly(str) || ismonthly(str) || isweekly(str);
else
b = false;
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment