All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.krono.utils.DaysOfMonth.kt Maven / Gradle / Ivy

The newest version!
@file:JsExport

package krono.utils

import kotlinx.JsExport
import kotlin.js.JsName

@JsName("daysOfMonth")
fun DaysOfMonth(year: Int, month: Int): Int {
    if (month == 2) return if (isLeapYear(year)) 29 else 28
    return 31 - (month - 1) % 7 % 2
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy