From c17bbe19e2a04dd1153c40347397350945a689fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 18 Dec 2020 13:56:21 +0100
Subject: [PATCH] =?UTF-8?q?intersect(=E2=80=A6,=20'rows',=20'legacy')=20wi?=
 =?UTF-8?q?ll=20be=20fixed=20in=20Octave=206.2.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/@dates/intersect.m | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/@dates/intersect.m b/src/@dates/intersect.m
index d0af974..c832887 100644
--- a/src/@dates/intersect.m
+++ b/src/@dates/intersect.m
@@ -38,9 +38,10 @@ if ~isequal(o.freq,p.freq)
     return
 end
 
-% Octave 6.1.0 added support for the 'legacy' option, but we don't use it
-% because of this bug: https://savannah.gnu.org/bugs/?59708
-if isoctave
+% Octave 6.1.0 added support for the 'legacy' option, but it was buggy.
+% The problem should be fixed in Octave 6.2.0.
+% See: https://savannah.gnu.org/bugs/?59708
+if isoctave && octave_ver_less_than('6.2')
     time = intersect(o.time,p.time,'rows');
 else
     time = intersect(o.time,p.time,'rows','legacy');
-- 
GitLab