0

i am beginner and trying to have code of weekdays, but only can get different days..

val sDay = Instant.ofEpochMilli(startedDay).atZone(ZoneId.systemDefault())
    .toLocalDate()

val eDay = Instant.ofEpochMilli(endDay).atZone(ZoneId.systemDefault())
    .toLocalDate()

val day: Long = ChronoUnit.DAYS.between(sDay,eDay)
val week: Long = ChronoUnit.WEEKS.between(sDay,eDay)
val diff = (endDay- startedDay).div((1000 * 60 * 60 * 24))

thank you in advance

i would like to caculate the below e.g. how many Monday between 1.Nov to 30.Nov? -> 4

Chole
  • 1

0 Answers0