Package-level declarations

Types

Link copied to clipboard

Interface for parsing and formatting a KalugaDate from/to a String.

Link copied to clipboard
abstract class BaseTimeZone

A TimeZone represents a time zone. Accounts for Daylight Savings

Link copied to clipboard

Style used for formatting a KalugaDate to and from a String

Link copied to clipboard

Default implementation of KalugaDate

Default implementation of KalugaDate

Default implementation of KalugaDate

Default implementation of KalugaDate

Default implementation of KalugaDate

Default implementation of KalugaDate backed by the luxon JS library. Mirrors java.util.Calendar semantics:

Link copied to clipboard
abstract class KalugaDate : Comparable<KalugaDate>

Class describing a point in time Dates are localized according to a KalugaLocale and relative to a given KalugaTimeZone

Link copied to clipboard

Default implementation of BaseDateFormatter

Default implementation of BaseDateFormatter

Default implementation of BaseDateFormatter

Default implementation of BaseDateFormatter

Default implementation of BaseDateFormatter

Default implementation of BaseDateFormatter backed by the ECMAScript Intl.DateTimeFormat API for style-based formatting and the luxon library for custom pattern formatting and parsing. Shared by the JS family (js + wasmJs).

Link copied to clipboard
actual typealias KalugaDateHolder = Date

Class holding the platform value of the desired Date.

actual typealias KalugaDateHolder = NSDate
typealias KalugaDateHolder = NSDate

Class holding the platform value of the desired Date.

expect class KalugaDateHolder

Class holding the platform value of the desired Date.

actual typealias KalugaDateHolder = Date

Class holding the platform value of the desired Date.

actual typealias KalugaDateHolder = Date

Class holding the platform value of the desired Date.

actual class KalugaDateHolder

Class holding the platform value of the desired Date.

actual typealias KalugaDateHolder = NSDate
typealias KalugaDateHolder = NSDate

Class holding the platform value of the desired Date.

Link copied to clipboard

A default implementation of BaseTimeZone.

A default implementation of BaseTimeZone.

A default implementation of BaseTimeZone.

A default implementation of BaseTimeZone.

A default implementation of BaseTimeZone.

A default implementation of BaseTimeZone backed by the luxon JS library, shared by the JS family (js + wasmJs).

Link copied to clipboard

Properties

Link copied to clipboard

True if this KalugaDate is last month

Link copied to clipboard

True if this KalugaDate is last year

Link copied to clipboard

True if this KalugaDate is next month

Link copied to clipboard

True if this KalugaDate is next year

Link copied to clipboard

True if this KalugaDate is this month

Link copied to clipboard

True if this KalugaDate is this year

Link copied to clipboard

True if this KalugaDate is today

Link copied to clipboard

True if this KalugaDate is tomorrow

Link copied to clipboard

True if this KalugaDate is yesterday

Link copied to clipboard

Indicates whether this locale use a 24 hour clock cycle.

Link copied to clipboard

Functions

Link copied to clipboard
fun KalugaDateFormatter.Companion.dateFormat(style: DateFormatStyle = DateFormatStyle.Medium, excludeYear: Boolean, timeZone: KalugaTimeZone = KalugaTimeZone.current(), locale: KalugaLocale = defaultLocale): KalugaDateFormatter

Creates a KalugaDateFormatter that only formats the date components of a KalugaDate

Link copied to clipboard
fun KalugaDateFormatter.Companion.dateTimeFormat(dateStyle: DateFormatStyle = DateFormatStyle.Medium, excludeYear: Boolean, timeStyle: DateFormatStyle = DateFormatStyle.Medium, timeZone: KalugaTimeZone = KalugaTimeZone.current(), locale: KalugaLocale = defaultLocale): KalugaDateFormatter

Creates a KalugaDateFormatter that formats both date and time components of a KalugaDate

Link copied to clipboard
fun DefaultKalugaDate.Companion.epoch(offsetInMilliseconds: Long, timeZone: KalugaTimeZone = KalugaTimeZone.current(), locale: KalugaLocale = defaultLocale): KalugaDate

Creates a KalugaDate relative to January 1st 1970 00:00:00 GMT

Link copied to clipboard

Creates a fixed KalugaDateFormatter using a custom Date format pattern, localized by the KalugaLocale.enUsPosix. Use this to ensure that displaying time in 12 or 24 hour format is not overridden by the user.

Link copied to clipboard

Checks whether a KalugaDate is in the same year as a given Date.

Link copied to clipboard

Creates a KalugaDateFormatter that formats time according to the ISo 8601 format.

Link copied to clipboard

Checks whether a KalugaDate is on the same day as a given Date.

Link copied to clipboard

Checks whether a KalugaDate is on the same month as a given Date.

Link copied to clipboard
infix operator fun KalugaDate.minus(other: KalugaDate): Duration

Gets the Duration between two KalugaDate

infix operator fun KalugaDate.minus(duration: Duration): KalugaDate

Gets a KalugaDate that is duration before this date.

Link copied to clipboard
fun DefaultKalugaDate.Companion.now(offsetInMilliseconds: Long, timeZone: KalugaTimeZone = KalugaTimeZone.current(), locale: KalugaLocale = defaultLocale): KalugaDate

Creates a KalugaDate relative to the current time

Link copied to clipboard
fun DefaultKalugaDate.Companion.nowUtc(offsetInMilliseconds: Long, locale: KalugaLocale = defaultLocale): KalugaDate
fun DefaultKalugaDate.Companion.nowUtc(offset: Duration = 0.milliseconds, locale: KalugaLocale = defaultLocale): KalugaDate

Creates a KalugaDate relative to the current time, in the UTC timezone

Link copied to clipboard
infix operator fun KalugaDate.plus(duration: Duration): KalugaDate

Gets a KalugaDate that is duration after this date.

Link copied to clipboard
fun DefaultKalugaDate.Companion.today(timeZone: KalugaTimeZone = KalugaTimeZone.current(), locale: KalugaLocale = defaultLocale): KalugaDate

Gets a KalugaDate that is set at midnight on the same day as the current time.

Link copied to clipboard

Gets a KalugaDate equal to 23:59:59:999 on the same day as this Date

Link copied to clipboard
fun DefaultKalugaDate.Companion.tomorrow(timeZone: KalugaTimeZone = KalugaTimeZone.current(), locale: KalugaLocale = defaultLocale): KalugaDate

Gets a KalugaDate that is set at midnight on the day after the current time.

Link copied to clipboard

Gets a KalugaDate equal to midnight on the same day as this Date