From 071d02344bb3de5f7a7f90566b4e6649bd2de2b2 Mon Sep 17 00:00:00 2001
From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org>
Date: Sun, 27 Sep 1998 15:08:26 +0200
Subject: [PATCH] some fixes (better '< '> for Day, ISO year name)

Rev: lib/modules/Calendar.pmod/Gregorian.pmod:1.16
Rev: lib/modules/Calendar.pmod/ISO.pmod:1.4
---
 lib/modules/Calendar.pmod/Gregorian.pmod | 11 +++++++----
 lib/modules/Calendar.pmod/ISO.pmod       |  5 +++++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/lib/modules/Calendar.pmod/Gregorian.pmod b/lib/modules/Calendar.pmod/Gregorian.pmod
index d93f3a3ce4..3fbe43ea13 100644
--- a/lib/modules/Calendar.pmod/Gregorian.pmod
+++ b/lib/modules/Calendar.pmod/Gregorian.pmod
@@ -621,21 +621,24 @@ class Day
    {
       return 
 	 (object_program(x)==object_program(this) &&
-	  (x->y==y && x->d<d) || (x->y<y));
+	  (x->y==y && x->d<d) || (x->y<y)) ||
+	 (x->julian_day()<julian_day());
    }
 
    int `==(object x)
    {
       return 
-	 object_program(x)==object_program(this) &&
-	 x->y==y && x->d==d;
+	 (object_program(x)==object_program(this) &&
+	  x->y==y && x->d==d) ||
+	 (x->julian_day() == julian_day());
    }
 
    int `>(object x)
    {
       return 
 	 (object_program(x)==object_program(this) &&
-	  (x->y==y && x->d>d) || (x->y>y));
+	  (x->y==y && x->d>d) || (x->y>y)) ||
+	 (x->julian_day()>julian_day());
    }
 
    object `+(int n)
diff --git a/lib/modules/Calendar.pmod/ISO.pmod b/lib/modules/Calendar.pmod/ISO.pmod
index 58f809e03d..3be7fc0361 100644
--- a/lib/modules/Calendar.pmod/ISO.pmod
+++ b/lib/modules/Calendar.pmod/ISO.pmod
@@ -11,6 +11,11 @@ class Year
       if (y>1999) return 31+29-1; // 29 Feb
       return 31+24-1; // 24 Feb
    }
+
+   string name()
+   {
+      return (string)y;
+   }
 }
 
 class Week
-- 
GitLab