Add further getters, converting the data to other units

here
danielegobbetti 2015-12-19 20:26:43 +01:00
parent 9fb2e1620e
commit 070f3fa66f
1 changed files with 12 additions and 0 deletions

View File

@ -99,6 +99,10 @@ public class CalendarEvents {
return begin;
}
public int getBeginSeconds() {
return (int)(begin/1000);
}
public long getEnd() {
return end;
}
@ -107,6 +111,14 @@ public class CalendarEvents {
return end - begin;
}
public int getDurationSeconds() {
return (int)((getDuration())/1000);
}
public short getDurationMinutes() {
return (short)(getDurationSeconds()/60);
}
public long getId() {
return id;