Kotlin get date and time code example
Example 1: kotlin get current date
val currentDate=LocalDate.now();
Example 2: get the time remaning for a date kotlin
val diff: Long = date1.getTime() - date2.getTime()
val seconds = diff / 1000
val minutes = seconds / 60
val hours = minutes / 60
val days = hours / 24