Package-level declarations

Types

Link copied to clipboard
class JavaTimeDateSerializer(parse: (date: String) -> LocalDate = { parseUnixDate(it) }, format: (date: LocalDate) -> String = { parseUnixDate(it) }) : JsonDeserializer<LocalDate> , JsonSerializer<LocalDate>

Represents a date with yyyy-MM-dd

Link copied to clipboard
class JavaTimeLocalDateTimeSerializer(parse: (date: String) -> LocalDateTime = { parseUnixLocalDateTime(it) }, format: (date: LocalDateTime) -> String = { parseUnixLocalDateTime(it) }) : JsonDeserializer<LocalDateTime> , JsonSerializer<LocalDateTime>

Represents a date with hour yyyy-mm-dd hh:mm:ss

Link copied to clipboard
class JavaTimeTimeSerializer(parse: (date: String) -> LocalTime = { parseUnixTime(it) }, format: (time: LocalTime) -> String = { parseUnixTime(it) }) : JsonDeserializer<LocalTime> , JsonSerializer<LocalTime>

Represents an hour like hh:mm:ss in local hour

Link copied to clipboard
class JavaTimeZonedDateTimeSerializer(parse: (date: String) -> ZonedDateTime = { parseUnix(it) }, format: (date: ZonedDateTime) -> String = { parseUnix(it) }) : JsonDeserializer<ZonedDateTime> , JsonSerializer<ZonedDateTime>

Represents a zoned date with hour yyyy-mm-dd hh:mm:ss

Properties

Link copied to clipboard
const val DATE_FORMAT: String
Link copied to clipboard

An standard with formats used by zapp-studio DateTime = ZonedDateTime / Contains all information about the local time, like schedule summer and grenwich changes, this is the class most used. Date = LocalDate / Contains information about a date, without taking into account the offset time and schedule summer. Time = LocalTime contains the information about an hour, without taking into account grenwich deplacement. Must be sended by server in the local hour

Link copied to clipboard
const val TIME_FORMAT: String

Functions

Link copied to clipboard
fun LocalDate.parse(pattern: String = DATE_FORMAT, locale: Locale = Locale.getDefault()): String
fun LocalDateTime.parse(pattern: String = FULL_DATE_TIME_FORMAT, locale: Locale = Locale.getDefault()): String
fun LocalTime.parse(pattern: String = TIME_FORMAT, locale: Locale = Locale.getDefault()): String
fun ZonedDateTime.parse(pattern: String = FULL_DATE_TIME_FORMAT, locale: Locale = Locale.getDefault(), zoneId: ZoneId = ZoneId.systemDefault()): String
Link copied to clipboard
fun parseDate(date: TemporalAccessor, pattern: String = DATE_FORMAT, locale: Locale = Locale.getDefault()): String

fun parseDate(time: String, pattern: String = DATE_FORMAT, locale: Locale = Locale.getDefault()): LocalDate

Local date without taking into account hour and timezone

Link copied to clipboard
fun parseDateTime(date: TemporalAccessor, pattern: String = FULL_DATE_TIME_FORMAT, locale: Locale = Locale.getDefault(), zoneId: ZoneId = ZoneId.of("Etc/UTC")): String

fun parseDateTime(date: String, pattern: String = FULL_DATE_TIME_FORMAT, locale: Locale = Locale.getDefault(), zoneId: ZoneId = ZoneId.of("Etc/UTC"), localZone: ZoneId = ZoneId.systemDefault()): ZonedDateTime

Functions to format with zone

Link copied to clipboard
fun parseLocalDateTime(date: TemporalAccessor, pattern: String = FULL_DATE_TIME_FORMAT, locale: Locale = Locale.getDefault()): String

fun parseLocalDateTime(date: String, pattern: String = FULL_DATE_TIME_FORMAT, locale: Locale = Locale.getDefault()): LocalDateTime

Local Date and time without taking into account hour and timezone

Link copied to clipboard
fun parseTime(time: TemporalAccessor, pattern: String = TIME_FORMAT, locale: Locale = Locale.getDefault()): String

fun parseTime(time: String, pattern: String = TIME_FORMAT, locale: Locale = Locale.getDefault()): LocalTime

Functions to format date

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard