[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: calendar_support: kdelibs/kdecore
From: Hans Petter Bieker <bieker () kde ! org>
Date: 2002-12-19 14:36:53
[Download RAW message or body]
CVS commit by bieker:
added minValidYear().
M +8 -0 kcalendarsystem.h 1.1.2.8
M +5 -0 kcalendarsystemgregorian.cpp 1.1.2.7
M +1 -0 kcalendarsystemgregorian.h 1.1.2.6
M +8 -0 kcalendarsystemhijri.cpp 1.1.2.7
M +1 -0 kcalendarsystemhijri.h 1.1.2.6
--- kdelibs/kdecore/kcalendarsystemgregorian.cpp #1.1.2.6:1.1.2.7
@@ -199,4 +199,9 @@ int KCalendarSystemGregorian::daysInMont
}
+int KCalendarSystemGregorian::minValidYear() const
+{
+ return 1753; // QDate limit
+}
+
int KCalendarSystemGregorian::maxValidYear() const
{
--- kdelibs/kdecore/kcalendarsystemhijri.cpp #1.1.2.6:1.1.2.7
@@ -320,4 +320,12 @@ int KCalendarSystemHijri::hndays(int mon
}
+// Min valid year that may be converted to QDate
+int KCalendarSystemHijri::minValidYear() const
+{
+ QDate date(1753, 1, 1);
+
+ return year(date);
+}
+
// Max valid year that may be converted to QDate
int KCalendarSystemHijri::maxValidYear() const
--- kdelibs/kdecore/kcalendarsystemgregorian.h #1.1.2.5:1.1.2.6
@@ -62,4 +62,5 @@ public:
virtual QString weekDayName (int weekDay, bool shortName = false) const;
+ virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
--- kdelibs/kdecore/kcalendarsystem.h #1.1.2.7:1.1.2.8
@@ -194,4 +194,12 @@ public:
/**
+ * Gets the first year value supported by specific calendar type
+ * algorithms.
+ *
+ * @return first year supported
+ */
+ virtual int minValidYear () const = 0;
+
+ /**
* Gets the maximum year value supported by specific calendar type
* algorithms (QDate, 8000)
--- kdelibs/kdecore/kcalendarsystemhijri.h #1.1.2.5:1.1.2.6
@@ -67,4 +67,5 @@ public:
virtual QString weekDayName (int weekDay, bool shortName = false) const;
+ virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic