-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 @@ -411,6 +411,14 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_ } } *ok = false; return QDateTime (); } + +QString Event::durationText() +{ + int sec = mDtStart.secsTo( mDtEnd ); + if ( doesFloat() ) + sec += 86400; + return durationText4Time( sec ); +} |