-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 @@ -405,12 +405,20 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_ } 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 ); +} |