LocalDate

@Serializable(with = LocalDateSerializer::class)
class LocalDate(val year: Int, val month: Int, val day: Int)(source)

A calendar date without a time zone, the Kotlin form of the Data Connect Date scalar. month and day are 1-based; the values are not validated, so that dates from a server can be represented as sent.

Plain common code shared by every platform (the Android SDK's class has the same members); the conversions to and from java.time.LocalDate exist on the Android SDK only, use toKotlinxLocalDate and toDataConnectLocalDate from common code.

Constructors

Link copied to clipboard
constructor(year: Int, month: Int, day: Int)

Properties

Link copied to clipboard
val day: Int
Link copied to clipboard
val month: Int
Link copied to clipboard
val year: Int

Functions

Link copied to clipboard
fun LocalDate.copy(year: Int = this.year, month: Int = this.month, day: Int = this.day): LocalDate

A copy of this date with the given values replaced.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun LocalDate.toKotlinxLocalDate(): LocalDate

This date as a kotlinx.datetime.LocalDate, which validates it.

Link copied to clipboard
open override fun toString(): String