@dynDate.display(): simplify the code by reusing format()
parent
4b50acbb93
commit
fac7319284
|
@ -17,20 +17,5 @@ function display(d)
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
fprintf('%s = <dynDate: %d', inputname(1), d.time(1));
|
fprintf('%s = <dynDate: %s>\n', inputname(1), format(d));
|
||||||
switch d.freq
|
|
||||||
case 1
|
|
||||||
case 4
|
|
||||||
fprintf('Q')
|
|
||||||
case 12
|
|
||||||
fprintf('M')
|
|
||||||
case 52
|
|
||||||
fprintf('W')
|
|
||||||
otherwise
|
|
||||||
error('Unknown frequency %d', d.freq)
|
|
||||||
end
|
|
||||||
if d.freq ~= 1
|
|
||||||
fprintf('%d', d.time(2))
|
|
||||||
end
|
|
||||||
fprintf('>\n')
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue