KalugaDate

abstract class KalugaDate : Comparable<KalugaDate>

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

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val date: KalugaDateHolder

Reference to the underlying KalugaDateHolder

Link copied to clipboard
abstract var day: Int

The day of the current month

Link copied to clipboard
abstract var dayOfYear: Int

The day of the current year

Link copied to clipboard
abstract val daysInMonth: Int

The number of days in the current month

Link copied to clipboard

The Duration passed since epoch time (January 1st 1970 00:00:00:00 GMT)

Link copied to clipboard
abstract var era: Int

The number of the era, e.g., AD or BC in the Julian calendar

Link copied to clipboard
abstract var firstWeekDay: Int

The first day of the week. E.g. Sunday in the US, Monday in France. Starts at 1.

Link copied to clipboard
abstract var hour: Int

The hour of the current day

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
abstract var millisecond: Int

The millisecond of the current second

Link copied to clipboard

The number of milliseconds passed since epoch time (January 1st 1970 00:00:00:00 GMT)

Link copied to clipboard
abstract var minute: Int

The minute of the current hour

Link copied to clipboard
abstract var month: Int

The month of the year. Starts at 1

Link copied to clipboard
abstract var second: Int

The second of the current minute

Link copied to clipboard
abstract var timeZone: KalugaTimeZone

The KalugaTimeZone in which the Date is set

Link copied to clipboard
abstract var weekDay: Int

The day of the week. Starts at 1

Link copied to clipboard
abstract var weekOfMonth: Int

The week number within the current month

Link copied to clipboard
abstract var weekOfYear: Int

The week number within the current year.

Link copied to clipboard
abstract var year: Int

The year

Functions

Link copied to clipboard
abstract operator fun compareTo(other: KalugaDate): Int
Link copied to clipboard
abstract fun copy(): KalugaDate

Creates a copy of a KalugaDate

Link copied to clipboard
abstract operator override fun equals(other: Any?): Boolean

Returns whether this Date is in the same timeZone and has the same time based on durationSinceEpoch

Link copied to clipboard
abstract override fun hashCode(): Int
Link copied to clipboard

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

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
infix operator fun KalugaDate.plus(duration: Duration): KalugaDate

Gets a KalugaDate that is duration after this date.

Link copied to clipboard

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

Link copied to clipboard

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

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