commonMain.net.codinux.i18n.datetime.LocalDate.kt Maven / Gradle / Ivy
Go to download
Localizing language, country, unit and currency names and formatting numbers and dates for Kotlin Multiplatform with the data from Unicode CLDR project
The newest version!
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