Package com.motorro.keeplink.testaction.data

Sample custom data structures and functions to use - date and enum

Sample custom data structures and functions to use - date and enum

Sample custom data structures and functions to use - date and enum

Sample custom data structures and functions to use - date and enum

Types

Link copied to clipboard
data class LocalDateFields(    val year: Int,     val month: Int,     val day: Int) : ComponentValue

Represents local date which has 'YYYY-MM-DD` representation in components See platform implementation for details

Link copied to clipboard
data class TransportType(val value: String) : ComponentValue

Transport-type enum (JS-compatible)

Link copied to clipboard
object TransportTypes

Allowed transport-types (JS-compatible)

Functions

Link copied to clipboard
fun fromDate(date: Date): LocalDateFields

Creates LocalDateFields from Date object

Link copied to clipboard
fun fromLocalDate(date: LocalDate): LocalDateFields

Creates LocalDateFields from LocalDate object

Link copied to clipboard
fun fromYMD(    year: Int,     month: Int,     day: Int): LocalDateFields

Example to check iOS tests Creates LocalDateFields See JVM/JS sources to build fields from iOS date

Link copied to clipboard
fun toDate(localDateFields: LocalDateFields): Date

Export to JS Date

Link copied to clipboard
fun LocalDateFields.toLocalDate(): LocalDate

Export to LocalDate