From 1a0a4898a32be5231d7e457c5db5dfab8f39e3bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= <stepan@adjemian.eu> Date: Fri, 2 Oct 2020 00:00:23 +0200 Subject: [PATCH] Fixed year method. --- src/@dates/year.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/@dates/year.m b/src/@dates/year.m index 9148435..d8f83a6 100644 --- a/src/@dates/year.m +++ b/src/@dates/year.m @@ -2,7 +2,7 @@ function y = year(d) % Returns the year. -% Copyright (C) 2016-2017 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,10 @@ function y = year(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 d.freq==365 + tmp = datevec(d.time(1)); + y = tmp(1); + return +end + y = d.time(1); \ No newline at end of file -- GitLab