Any idea how I can derive the first and last day o...
# kotlinx-datetime
c
Any idea how I can derive the first and last day of the week?
i
The week of some specific date, e.g. of today, or the week with the specific number? If the former, then you can just subtract (the number of the current weekday - 1) from the given date, like following:
date.minus(date.dayOfWeek.isoDayNumber - 1, DateTimeUnit.DAY)
c
Yeah, that was it, thanks!