I have a current time from LocalTime.now(). I want to use this current time in check if between two double number But I can't convert the time to double
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val CurrentTime = LocalTime.now().format(DateTimeFormatter.ofPattern("HH.mm"))
tvDetailIcon = view.findViewById(R.id.tvDetailIcon)
testTime = view.findViewById(R.id.testTime)
testTime.text = CurrentTime
if (24.00<testTime && testTime<25.00 ){
constraint.setBackgroundColor(Color.parseColor("#34495e"))
tvDetailIcon.setImageResource(R.drawable.ic_baseline_nights_stay_24)
}
else if (1.00<testTime && testTime<24.00){
constraint.setBackgroundColor(Color.parseColor("#349Bdb"))
tvDetailIcon.setImageResource(R.drawable.ic_baseline_wb_sunny_72)
}