diff --git a/src/@dates/subperiod.m b/src/@dates/subperiod.m index 0722b672291ff83b258315510e982103ea90f974..245b3617cfad07bdfd9eb0d735d14c146e90997a 100644 --- a/src/@dates/subperiod.m +++ b/src/@dates/subperiod.m @@ -1,8 +1,8 @@ function s = subperiod(d) -% Returns the subperiod (half-year, quarter, month or week depending on the frequency). +% Returns the subperiod (half-year, quarter, or month depending on the frequency). -% Copyright (C) 2016-2020 Dynare Team +% Copyright © 2016-2020 Dynare Team % % This code is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by @@ -17,4 +17,8 @@ function s = subperiod(d) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. +if freq==365 || freq==1 + error('Method not available for daily or annual frequencies.') +end + s = d.time(2); \ No newline at end of file