@dynDate.display(): simplify the code by reusing format()

time-shift
Sébastien Villemot 2013-02-07 15:28:43 +01:00
parent 4b50acbb93
commit fac7319284
1 changed files with 1 additions and 16 deletions

View File

@ -17,20 +17,5 @@ function display(d)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
fprintf('%s = <dynDate: %d', inputname(1), d.time(1));
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')
fprintf('%s = <dynDate: %s>\n', inputname(1), format(d));
end