mohamed rejeb
DatePicker
Abhimanyu
datePickerState.selectedDateMillis
val startOfDayTimestamp: LocalDate = getLocalDate( timestamp = datePickerState.selectedDateMillis.orZero(), )
public fun getLocalDate( timestamp: Long, zoneId: ZoneId = getSystemDefaultZoneId(), ): LocalDate { return Instant .ofEpochMilli(timestamp) .toZonedDateTime( zoneId = zoneId, ) .toLocalDate() } public fun Instant.toZonedDateTime( zoneId: ZoneId = getSystemDefaultZoneId(), ): ZonedDateTime { return this.atZone(zoneId) } public fun getSystemDefaultZoneId(): ZoneId { return ZoneId.systemDefault() }
A modern programming language that makes developers happier.