diff --git a/lib/modules/Calendar.pmod/Gregorian.pmod b/lib/modules/Calendar.pmod/Gregorian.pmod index d93f3a3ce4e9f5716bb684cb070ece459647c184..3fbe43ea139c08fb3eb5c1cf0d3e7171d9b3eb51 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 58f809e03d1d2b2a6bc50eeedfa6f594473b6dfb..3be7fc03618363ad4e4d3820d9445de75dc49abb 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