|
|
|
@ -98,7 +98,7 @@ fun Date.getFormattedDuration(toDate: Date) : String { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Return the date of the beginning of the current date |
|
|
|
// Return the date of the beginning of the current date |
|
|
|
fun Date.startOfTheDay() : Date { |
|
|
|
fun Date.startOfDay() : Date { |
|
|
|
val calendar = Calendar.getInstance() |
|
|
|
val calendar = Calendar.getInstance() |
|
|
|
calendar.time = this |
|
|
|
calendar.time = this |
|
|
|
calendar.set(Calendar.HOUR_OF_DAY, 0) |
|
|
|
calendar.set(Calendar.HOUR_OF_DAY, 0) |
|
|
|
@ -109,7 +109,7 @@ fun Date.startOfTheDay() : Date { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Return the date of the end of the current date |
|
|
|
// Return the date of the end of the current date |
|
|
|
fun Date.endOfTheDay() : Date { |
|
|
|
fun Date.endOfDay() : Date { |
|
|
|
val calendar = Calendar.getInstance() |
|
|
|
val calendar = Calendar.getInstance() |
|
|
|
calendar.time = this |
|
|
|
calendar.time = this |
|
|
|
calendar.set(Calendar.HOUR_OF_DAY, 23) |
|
|
|
calendar.set(Calendar.HOUR_OF_DAY, 23) |
|
|
|
|