]> git.saurik.com Git - wxWidgets.git/commitdiff
ensure that yesr is an integer
authorRobin Dunn <robin@alldunn.com>
Wed, 1 Dec 2004 22:00:43 +0000 (22:00 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 1 Dec 2004 22:00:43 +0000 (22:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/CDate.py

index d900e0d203a4b059f83a5c5a4951d380bd0addad..40574adc8261018e57eb6511c1a1c0e0956d2569 100644 (file)
@@ -7,6 +7,10 @@
 # Version       0.2 1999/11/08
 # Licence:      wxWindows license
 #----------------------------------------------------------------------------
+# Updated:      12/01/2004
+# Action:       Cast the year variable to an integer under the Date Class
+# Reason:       When the year was compared in the isleap() function, if it was
+#               in a string format, then an error was raised.    
 
 import time
 
@@ -119,7 +123,7 @@ class Date:
     def __init__(self, year, month, day):
         self.julian = julianDay(year, month, day)
         self.month = month
-        self.year = year
+        self.year = int(year)
         self.day_of_week = dayOfWeek(self.julian)
         self.days_in_month = daysPerMonth(self.month, self.year)