diff --git a/src/utilities/convert/string2date.m b/src/utilities/convert/string2date.m index 81172b9d09fb7e057f44f5eecf1a448caa83d872..96835ea6df0f708409f2b3029429b82db2a36ac0 100644 --- a/src/utilities/convert/string2date.m +++ b/src/utilities/convert/string2date.m @@ -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); diff --git a/src/utilities/is/isquaterly.m b/src/utilities/is/isquarterly.m similarity index 70% rename from src/utilities/is/isquaterly.m rename to src/utilities/is/isquarterly.m index 2c421cb118aba8307c1d123a57755ada72be634f..1a0a8b3a1c0a723f99bf537722ea83ffda9f95e5 100644 --- a/src/utilities/is/isquaterly.m +++ b/src/utilities/is/isquarterly.m @@ -1,12 +1,12 @@ -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 diff --git a/src/utilities/is/isstringdate.m b/src/utilities/is/isstringdate.m index 3f1b84a40feab7d872265884db23194cdfc01f22..ffbcefc87263c71b55c463f7648d82c0cd415eec 100644 --- a/src/utilities/is/isstringdate.m +++ b/src/utilities/is/isstringdate.m @@ -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