Open
Description
We received a few requests to add converters from LocalDate
and LocalDateTime
to NSDate
. Given that NSDate
is essentially the same as Instant
, they could look something like this:
fun LocalDate.toNSDateAtStartOfDayIn(timeZone: TimeZone) =
atStartOfDayIn(timeZone).toNSDate()
fun LocalDateTime.toNSDate(timeZone: TimeZone) =
toInstant(timeZone).toNSDate()
They seem quite short, but if they are tricky to get right, maybe we could introduce them to the library.