-rw-r--r-- | libkcal/event.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libkcal/event.cpp b/libkcal/event.cpp index 0766fd9..fdf5657 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp @@ -393,24 +393,32 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_ off = alarmStart.secsTo( incidenceStart ); } } else { int secs = alarm->startOffset().asSeconds(); if ( incidenceStart.addSecs( secs ) < alarmStart ) { alarmStart = incidenceStart.addSecs( secs ); enabled = true; off = -secs; } } } } if ( enabled ) { if ( alarmStart > start_dt ) { *ok = true; * offset = off; return alarmStart; } } *ok = false; return QDateTime (); } + +QString Event::durationText() +{ + int sec = mDtStart.secsTo( mDtEnd ); + if ( doesFloat() ) + sec += 86400; + return durationText4Time( sec ); +} |