From ab41e301eb7f06af0869844d197e38a7838f3f2d Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 18 Feb 2004 23:25:18 +0000 Subject: Gross hack to allow compilation with Qt3 more easily Qt got a DateFormat as well so we use a define to call our QPEDateFormat --- (limited to 'library/timestring.h') diff --git a/library/timestring.h b/library/timestring.h index f8cb3e6..0335715 100644 --- a/library/timestring.h +++ b/library/timestring.h @@ -23,11 +23,15 @@ #include #include +#if (QT_VERSION-0 >= 0x030000) +#define DateFormat QPEDateFormat +#endif + // return a string with the time based on whether or not you want // you want it in 12 hour form. if ampm is true, then return // it in 12 hour (am/pm) form otherwise return it in 24 hour form // in theory Qt 3,0 handles this better (hopefully obsoleteing this) -class DateFormat +class DateFormat { public: // date format type 001,010,100 = day month year @@ -95,11 +99,11 @@ class TimeString { public: - //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601, + //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601, //YearMonthDay = ISO8601 }; - static QString shortDate( const QDate &d ) + static QString shortDate( const QDate &d ) { return shortDate( d, currentDateFormat() ); } static QString dateString( const QDate &d ) { return dateString( d, currentDateFormat() ); } @@ -129,7 +133,7 @@ public: private: static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat ); - + }; -- cgit v0.9.0.2