fun checkIfInRangeOfHours(startHour: String, endHour: String): Boolean {
val currentTime = Calendar.getInstance().time
val currentDate = SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH).format(currentTime)
val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd hh:mm", Locale.ENGLISH)
val startDate: Date? = simpleDateFormat.parse("$currentDate $startHour")
val endDate: Date? = simpleDateFormat.parse("$currentDate $endHour")
return Date().after(startDate) && Date().before(endDate)
}
fun checkIfInRangeOfHours(startHour: String, endHour: String): Boolean {
val currentTime = Calendar.getInstance().time
val currentDate = SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH).format(currentTime)
val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd hh:mm", Locale.ENGLISH)
val startDate: Date? = simpleDateFormat.parse("$currentDate $startHour")
val endDate: Date? = simpleDateFormat.parse("$currentDate $endHour")
return Date().after(startDate) && Date().before(endDate)
}