summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2005-06-26 08:17:08 (UTC)
committer zautrix <zautrix>2005-06-26 08:17:08 (UTC)
commitf27e8c6cc8abbd27f10167334d608c7e0af7f711 (patch) (side-by-side diff)
treeb516d5512178f98d105a5d77f96aff29dfe09c02 /libkcal
parent6d8fdbda8cb12b768932a80ccd25d275bc4b30f9 (diff)
downloadkdepimpi-f27e8c6cc8abbd27f10167334d608c7e0af7f711.zip
kdepimpi-f27e8c6cc8abbd27f10167334d608c7e0af7f711.tar.gz
kdepimpi-f27e8c6cc8abbd27f10167334d608c7e0af7f711.tar.bz2
rec fix
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/sharpformat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index c2ee2c9..9b757f7 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -778,97 +778,97 @@ QString SharpFormat::getEventString( Event* event )
break;
case Recurrence::rMonthlyPos:// 2
list.append( "2" );
list.append( QString::number( rec->frequency()) );//12
writeEndDate = true;
{
int count = 1;
QPtrList<Recurrence::rMonthPos> rmp;
rmp = rec->monthPositions();
if ( rmp.first()->negative )
count = 5 - rmp.first()->rPos - 1;
else
count = rmp.first()->rPos - 1;
list.append( QString::number( count ) );
}
list.append( "0" );
break;
case Recurrence::rMonthlyDay:// 3
list.append( "3" );
list.append( QString::number( rec->frequency()) );//12
list.append( "0" );
list.append( "0" );
writeEndDate = true;
break;
case Recurrence::rYearlyMonth://4
list.append( "4" );
list.append( QString::number( rec->frequency()) );//12
list.append( "0" );
list.append( "0" );
writeEndDate = true;
break;
default:
list.append( "255" );
list.append( QString() );
list.append( "0" );
list.append( QString() );
list.append( "0" );
list.append( "20991231T000000" );
break;
}
if ( writeEndDate ) {
if ( rec->endDate().isValid() ) { // 15 + 16
list.append( "1" );
- list.append( dtToString( rec->endDate()) );
+ list.append( dtToString( rec->endDate(), false ) );
} else {
list.append( "0" );
list.append( "20991231T000000" );
}
}
if ( event->doesFloat () ) {
list.append( dtToString( event->dtStart(), false ).left( 8 ));
list.append( dtToString( event->dtEnd(), false ).left( 8 )); //6
}
else {
list.append( QString() );
list.append( QString() );
}
if (event->dtStart().date() == event->dtEnd().date() )
list.append( "0" );
else
list.append( "1" );
for(QStringList::Iterator it=list.begin();
it!=list.end(); ++it){
QString& s = (*it);
s.replace(QRegExp("\""), "\"\"");
if(s.contains(QRegExp("[,\"\r\n]")) || s.stripWhiteSpace() != s){
s.prepend('\"');
s.append('\"');
} else if(s.isEmpty() && !s.isNull()){
s = "\"\"";
}
}
return list.join(",");
}
QString SharpFormat::getTodoString( Todo* todo )
{
QStringList list;
list.append( todo->getID("Sharp_DTM") );
list.append( todo->categories().join(",") );
if ( todo->hasStartDate() ) {
list.append( dtToString( todo->dtStart()) );
} else
list.append( QString() );