core-ktx / androidx.time / kotlin.Int

Extensions for kotlin.Int

asDayOfWeek

fun Int.asDayOfWeek(): DayOfWeek

Return the DayOfWeek for this value.

asMonth

fun Int.asMonth(): Month

Return the Month for this value.

asYear

fun Int.asYear(): Year

Return the Year for this value.

days

fun Int.days(): Period

Return a Period representing this value in days.

hours

fun Int.hours(): Duration

Return a Duration representing this value in hours.

millis

fun Int.millis(): Duration

Return a Duration representing this value in milliseconds.

minutes

fun Int.minutes(): Duration

Return a Duration representing this value in minutes.

months

fun Int.months(): Period

Return a Period representing this value in months.

nanos

fun Int.nanos(): Duration

Return a Duration representing this value in nanoseconds.

seconds

fun Int.seconds(): Duration

Return a Duration representing this value in seconds.

years

fun Int.years(): Period

Return a Period representing this value in years.