summaryrefslogtreecommitdiff
path: root/library
Unidiff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/timestring.h12
1 files changed, 8 insertions, 4 deletions
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 @@
23#include <qdatetime.h> 23#include <qdatetime.h>
24#include <qstring.h> 24#include <qstring.h>
25 25
26#if (QT_VERSION-0 >= 0x030000)
27#define DateFormat QPEDateFormat
28#endif
29
26// return a string with the time based on whether or not you want 30// return a string with the time based on whether or not you want
27// you want it in 12 hour form. if ampm is true, then return 31// you want it in 12 hour form. if ampm is true, then return
28// it in 12 hour (am/pm) form otherwise return it in 24 hour form 32// it in 12 hour (am/pm) form otherwise return it in 24 hour form
29// in theory Qt 3,0 handles this better (hopefully obsoleteing this) 33// in theory Qt 3,0 handles this better (hopefully obsoleteing this)
30class DateFormat 34class DateFormat
31{ 35{
32public: 36public:
33 // date format type 001,010,100 = day month year 37 // date format type 001,010,100 = day month year
@@ -95,11 +99,11 @@ class TimeString
95{ 99{
96public: 100public:
97 101
98 //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601, 102 //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601,
99 //YearMonthDay = ISO8601 }; 103 //YearMonthDay = ISO8601 };
100 104
101 105
102 static QString shortDate( const QDate &d ) 106 static QString shortDate( const QDate &d )
103 { return shortDate( d, currentDateFormat() ); } 107 { return shortDate( d, currentDateFormat() ); }
104 static QString dateString( const QDate &d ) 108 static QString dateString( const QDate &d )
105 { return dateString( d, currentDateFormat() ); } 109 { return dateString( d, currentDateFormat() ); }
@@ -129,7 +133,7 @@ public:
129 133
130private: 134private:
131 static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat ); 135 static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat );
132 136
133 137
134}; 138};
135 139