https://kotlinlang.org logo
Title
u

user

07/20/2022, 9:01 PM
How to get current date with reset time 00:00 in kotlin Hey I am using calendar instance to get current date and time. private fun getCurrentCalendar() { Calendar.getInstance() } Output:- Wed Jul 20 21:45:52 GMT+01:00 2022 If I want to reset time I need to use this function fun resetCalendarTime(calendar: Calendar) { calendar.set(Calendar.HOUR_OF_DAY, 0) calendar.set(Calendar.MINUTE, 0) calendar.set(Calendar.SECOND, 0) calendar.set(Calendar.MILLISECOND, 0) } it will give this Wed Jul 20 00:00:00 GMT+01:00 2022 My question is...