isoDayNumber

The ISO 8601 number of the given day of the week. Monday is 1, Sunday is 7.

Samples

import kotlinx.datetime.*
import kotlin.test.*

fun main() { 
   //sampleStart 
   // Getting the ISO day-of-week number
check(DayOfWeek.MONDAY.isoDayNumber == 1)
check(DayOfWeek.TUESDAY.isoDayNumber == 2)
// ...
check(DayOfWeek.SUNDAY.isoDayNumber == 7) 
   //sampleEnd
}