Commits

Yuji Hanamura committed 2e0c342

Support the comparation of WeekDb objects.

Comments (0)

Files changed (1)

         if isinstance(year, basestring):
             year = int(year)
         self.__week_db = self.__init_db(year)
+        self.__year = year
 
 
     def __init_db(self, year):
         return self.__week_db[x]
 
 
+    def __cmp__(self, other):
+
+        return cmp(self.__year, other.__year)
+
+
 def get_week_num(date=None):
 
     if not date: