Update methods name

feature/top10
Aurelien Hubert 7 years ago
parent 3d34097371
commit df9252e290
  1. 4
      app/src/main/java/net/pokeranalytics/android/util/extensions/DateExtension.kt

@ -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)

Loading…
Cancel
Save