diff --git a/src/@dates/year.m b/src/@dates/year.m
index 9148435a052ffdab89349ba5d437ebed88056eac..d8f83a6fddcf545c417e09f63f835c0703e6be04 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