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

commonMain.net.codinux.i18n.datetime.LocalDate.kt Maven / Gradle / Ivy

package net.codinux.i18n.datetime

data class LocalDate(
    val year: Int,
    val month: Int,
    val dayOfMonth: Int
) {
    init {
        require(month in 1..12) { "Invalid month, value must be in bounds [1-12]: $month" }
        require(dayOfMonth in 1..31) { "Invalid day, value must be in bounds [1-31]: $dayOfMonth" }
    }

    override fun toString() = "$year-$month-$dayOfMonth"
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy