From 20e2106d8fcd8e4ffacd1aab3421c6e7168d27a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johan=20Sch=C3=B6n?= <js@opera.com>
Date: Wed, 29 Apr 1998 22:53:18 +0200
Subject: [PATCH] Added more functions to class second

Rev: lib/modules/Calendar.pmod/Gregorian.pmod:1.11
---
 lib/modules/Calendar.pmod/Gregorian.pmod | 27 +++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/lib/modules/Calendar.pmod/Gregorian.pmod b/lib/modules/Calendar.pmod/Gregorian.pmod
index e8f2b2f0ac..4e8221c4a5 100644
--- a/lib/modules/Calendar.pmod/Gregorian.pmod
+++ b/lib/modules/Calendar.pmod/Gregorian.pmod
@@ -1157,12 +1157,12 @@ class Second
 
    array(string) greater()
    {
-      return ({"minute"});
+      return ({"minute","hour","day","month","year"});
    } 
 
    array(string) lesser()
    {
-      return ({"second"});
+      return ({});
    }
 
    void create(int|object ... arg)
@@ -1298,12 +1298,33 @@ class Second
       return sprintf("%s:%02s",m->timeofyear(),name());
    }
 
-//-- more -----------------------------------------------------------
+//-- greater --------------------------------------------------------
      
    object minute()
    {
       return m;
    }
+
+   object hour()
+   {
+      return minute()->hour();
+   }
+
+   object day()
+   {
+      return minute()->hour()->day();
+   }
+
+  object month()
+  {
+    return minute()->hour()->day()->month();
+  }
+
+  object year()
+  {
+    return minute()->hour()->day()->month()->year();
+  }
+  
 };
 
 
-- 
GitLab