summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/traninfo.cpp
authormickeyl <mickeyl>2003-10-30 13:18:08 (UTC)
committer mickeyl <mickeyl>2003-10-30 13:18:08 (UTC)
commit37414f207b147af4cf6778b323a0aa23127901bd (patch) (unidiff)
treeb08c10043ab689b0a40425d268cd72226799b0cf /noncore/apps/checkbook/traninfo.cpp
parentd53637f46cf217fc760d7aac58b4596843a73803 (diff)
downloadopie-37414f207b147af4cf6778b323a0aa23127901bd.zip
opie-37414f207b147af4cf6778b323a0aa23127901bd.tar.gz
opie-37414f207b147af4cf6778b323a0aa23127901bd.tar.bz2
apply patch to HEAD
Diffstat (limited to 'noncore/apps/checkbook/traninfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/traninfo.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/noncore/apps/checkbook/traninfo.cpp b/noncore/apps/checkbook/traninfo.cpp
index d880bb4..506f567 100644
--- a/noncore/apps/checkbook/traninfo.cpp
+++ b/noncore/apps/checkbook/traninfo.cpp
@@ -29,6 +29,7 @@
29#include "traninfo.h" 29#include "traninfo.h"
30 30
31#include <qpe/config.h> 31#include <qpe/config.h>
32#include <qpe/timestring.h>
32 33
33QString tempstr; 34QString tempstr;
34 35
@@ -124,14 +125,17 @@ TranInfo::TranInfo( Config config, int entry )
124} 125}
125 126
126// --- datestr ---------------------------------------------------------------- 127// --- datestr ----------------------------------------------------------------
127const QString &TranInfo::datestr() 128const QString &TranInfo::datestr(bool bDisplayDate)
128{ 129{
129 int y=td.year(); 130 if( bDisplayDate ) {
130 y= y>=2000 && y<=2099 ? y-2000 : y; 131 tempstr=TimeString::numberDateString( td );
131 tempstr.sprintf( "%02d/%02d/%02d", y ,td.month(), td.day() ); 132 } else {
132 return( tempstr ); 133 tempstr.sprintf( "%04d-%02d-%02d", td.year() ,td.month(), td.day() );
134 }
135 return(tempstr);
133} 136}
134 137
138
135// --- getIdStr --------------------------------------------------------------- 139// --- getIdStr ---------------------------------------------------------------
136const QString &TranInfo::getIdStr() 140const QString &TranInfo::getIdStr()
137{ 141{
@@ -210,3 +214,14 @@ QString TranInfo::toString()
210 ); 214 );
211 return(ret); 215 return(ret);
212} 216}
217
218
219// --- findMostRecentByDesc ---------------------------------------------------
220TranInfo *TranInfoList::findMostRecentByDesc( const QString &desc )
221{
222 for(TranInfo *cur=last(); cur; cur=prev()) {
223 if( cur->desc()==desc )
224 return( cur );
225 }
226 return(NULL);
227} \ No newline at end of file