Package io.islandtime

Date-time primitives and core concepts, including classes such as Date, Time, Instant, and ZonedDateTime.

Types

Date
Link copied to clipboard
common
class Date(year: Int, month: Month, day: Int) : Comparable<Date>
A date in an ambiguous region.
DateTime
Link copied to clipboard
common
class DateTime(date: Date, time: Time) : Comparable<DateTime>
A date and time of day in an ambiguous region.
DateTimeException
Link copied to clipboard
common
open class DateTimeException(message: String?, cause: Throwable?) : Exception
DayOfWeek
Link copied to clipboard
common
enum DayOfWeek : Enum<DayOfWeek>
A day of the week.
Instant
Link copied to clipboard
common
class Instant : TimePoint<Instant> , Comparable<Instant>
An instant in time with nanosecond-precision.
IslandTime
Link copied to clipboard
common
object IslandTime
Global configuration for Island Time.
Month
Link copied to clipboard
common
enum Month : Enum<Month>
A month of the year.
OffsetConversionStrategy
Link copied to clipboard
common
enum OffsetConversionStrategy : Enum<OffsetConversionStrategy>
Strategy to use when converting a local date-time accompanied by a UtcOffset to a date and time that are valid according to the rules of a TimeZone.
OffsetDateTime
Link copied to clipboard
common
class OffsetDateTime(dateTime: DateTime, offset: UtcOffset) : TimePoint<OffsetDateTime>
A date and time of day with an offset from UTC.
OffsetTime
Link copied to clipboard
common
class OffsetTime(time: Time, offset: UtcOffset)
A time of day with an offset from UTC.
PlatformInstant
Link copied to clipboard
common
class PlatformInstant
A platform-specific representation of an instant in time.
typealias PlatformInstant = <ERROR CLASS>
typealias PlatformInstant = Instant
Time
Link copied to clipboard
common
class Time(hour: Int, minute: Int, second: Int, nanosecond: Int) : Comparable<Time>
A time of day in an ambiguous region.
TimeZone
Link copied to clipboard
common
sealed class TimeZone : Comparable<TimeZone>
A time zone.
UtcOffset
Link copied to clipboard
common
inline class UtcOffset(totalSeconds: IntSeconds) : Comparable<UtcOffset>
The time shift between a local time and UTC.
Year
Link copied to clipboard
common
inline class Year(value: Int) : Comparable<Year>
A year as defined by ISO-8601.
YearMonth
Link copied to clipboard
common
class YearMonth(year: Int, month: Month) : Comparable<YearMonth>
A month in a particular year.
ZonedDateTime
Link copied to clipboard
common
class ZonedDateTime : TimePoint<ZonedDateTime>
A date and time of day in a particular region.

Functions

asTimeZone
Link copied to clipboard
common
fun UtcOffset.asTimeZone(): TimeZone
Converts this UtcOffset into a fixed-offset TimeZone.
asUtcOffset
Link copied to clipboard
common
fun IntHours.asUtcOffset(): UtcOffset
Converts a duration of hours into a UtcOffset of the same length.
fun IntMinutes.asUtcOffset(): UtcOffset
Converts a duration of minutes into a UtcOffset of the same length.
fun IntSeconds.asUtcOffset(): UtcOffset
Converts a duration of seconds into a UtcOffset of the same length.
asZonedDateTime
Link copied to clipboard
common
fun OffsetDateTime.asZonedDateTime(): ZonedDateTime
Converts this OffsetDateTime to an equivalent ZonedDateTime using a fixed-offset time zone.
at
Link copied to clipboard
common
infix fun Date.at(offsetTime: OffsetTime): OffsetDateTime
Combines a local date with a time and UTC offset to create an OffsetDateTime.
infix fun Date.at(time: Time): DateTime
Combines a Date with a Time to create a DateTime.
infix fun DateTime.at(zone: TimeZone): ZonedDateTime
Combines a local date and time with a time zone to create a ZonedDateTime.
infix fun DateTime.at(offset: UtcOffset): OffsetDateTime
Combines a local date and time with a UTC offset to create an OffsetDateTime.
infix fun Instant.at(zone: TimeZone): ZonedDateTime
Combines an instant with a time zone to create a ZonedDateTime.
infix fun Instant.at(offset: UtcOffset): OffsetDateTime
Combines an instant with a UTC offset to create an OffsetDateTime.
infix fun Time.at(offset: UtcOffset): OffsetTime
Combines a local time with a UTC offset to create an OffsetTime.
infix fun Year.at(month: Month): YearMonth
Combines a year and month to create a YearMonth.
atDay
Link copied to clipboard
common
fun YearMonth.atDay(day: Int): Date
Combines a YearMonth with a day of the month to create a Date.
atMonth
Link copied to clipboard
common
fun Year.atMonth(number: Int): YearMonth
Combines a year and month number to create a YearMonth.
atTime
Link copied to clipboard
common
fun Date.atTime(hour: Int, minute: Int, second: Int = 0, nanosecond: Int = 0): DateTime
Combines a Date with a time to create a DateTime.
Date
Link copied to clipboard
common
fun Date(year: Int, dayOfYear: Int): Date
Creates a Date from a year and day of year
endOfDayAt
Link copied to clipboard
common
fun Date.endOfDayAt(zone: TimeZone): ZonedDateTime
The ZonedDateTime at the last representable instant of the day in zone, taking into account any daylight savings transitions.
endOfWeek
Link copied to clipboard
common
fun Date.endOfWeek(settings: WeekSettings): Date
The date at the end of the week that this date falls in.
fun Date.endOfWeek(locale: Locale): Date
The date at the end of the week that this date falls in.
fun DateTime.endOfWeek(settings: WeekSettings): DateTime
The date-time at the last representable instant of the week that this date-time falls in.
fun DateTime.endOfWeek(locale: Locale): DateTime
The date-time at the last representable instant of the week that this date-time falls in.
fun OffsetDateTime.endOfWeek(settings: WeekSettings): OffsetDateTime
The date-time at the last representable instant of the week that this date-time falls in.
fun OffsetDateTime.endOfWeek(locale: Locale): OffsetDateTime
The date-time at the last representable instant of the week that this date-time falls in.
fun ZonedDateTime.endOfWeek(settings: WeekSettings): ZonedDateTime
The date-time at the last representable instant of the week that this date-time falls in.
fun ZonedDateTime.endOfWeek(locale: Locale): ZonedDateTime
The date-time at the last representable instant of the week that this date-time falls in.
fromWeekDate
Link copied to clipboard
common
fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int): Date
Creates a Date from an ISO week date.
fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int, settings: WeekSettings): Date
Creates a Date from a week date representation using the week definition in settings.
fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int, locale: Locale): Date
Creates a Date from a week date representation using the week definition associated with the provided locale.
Instant
Link copied to clipboard
common
fun Instant(millisecondsSinceUnixEpoch: LongMilliseconds): Instant
Creates the Instant represented by a number of milliseconds relative to the Unix epoch of 1970-01-01T00:00Z.
fun Instant(secondsSinceUnixEpoch: LongSeconds): Instant
Creates the Instant represented by a number of seconds relative to the Unix epoch of 1970-01-01T00:00Z.
fun Instant(secondsSinceUnixEpoch: LongSeconds, nanosecondAdjustment: IntNanoseconds): Instant
Creates the Instant represented by a number of seconds and additional nanoseconds relative to the Unix epoch of 1970-01-01T00:00Z.
fun Instant(secondsSinceUnixEpoch: LongSeconds, nanosecondAdjustment: LongNanoseconds): Instant
Creates the Instant represented by a number of seconds and additional nanoseconds relative to the Unix epoch of 1970-01-01T00:00Z.
next
Link copied to clipboard
common
fun Date.next(dayOfWeek: DayOfWeek): Date
The next date after this one that falls on dayOfWeek.
fun DateTime.next(dayOfWeek: DayOfWeek): DateTime
The next date-time after this one that falls on dayOfWeek.
fun OffsetDateTime.next(dayOfWeek: DayOfWeek): OffsetDateTime
The next date-time after this one that falls on dayOfWeek.
fun ZonedDateTime.next(dayOfWeek: DayOfWeek): ZonedDateTime
The next date-time after this one that falls on dayOfWeek.
nextOrSame
Link copied to clipboard
common
fun Date.nextOrSame(dayOfWeek: DayOfWeek): Date
The next date that falls on dayOfWeek, or this date if it falls on the same day.
fun DateTime.nextOrSame(dayOfWeek: DayOfWeek): DateTime
The next date-time that falls on dayOfWeek, or this date-time if it falls on the same day.
fun OffsetDateTime.nextOrSame(dayOfWeek: DayOfWeek): OffsetDateTime
The next date-time that falls on dayOfWeek, or this date-time if it falls on the same day.
fun ZonedDateTime.nextOrSame(dayOfWeek: DayOfWeek): ZonedDateTime
The next date-time that falls on dayOfWeek, or this date-time if it falls on the same day.
previous
Link copied to clipboard
common
fun Date.previous(dayOfWeek: DayOfWeek): Date
The last date before this one that falls on dayOfWeek.
fun DateTime.previous(dayOfWeek: DayOfWeek): DateTime
The last date-time before this one that falls on dayOfWeek.
fun OffsetDateTime.previous(dayOfWeek: DayOfWeek): OffsetDateTime
The last date-time before this one that falls on dayOfWeek.
fun ZonedDateTime.previous(dayOfWeek: DayOfWeek): ZonedDateTime
The last date-time before this one that falls on dayOfWeek.
previousOrSame
Link copied to clipboard
common
fun Date.previousOrSame(dayOfWeek: DayOfWeek): Date
The previous date that falls on dayOfWeek, or this date if it falls on the same day.
fun DateTime.previousOrSame(dayOfWeek: DayOfWeek): DateTime
The previous date-time that falls on dayOfWeek, or this date-time if it falls on the same day.
fun OffsetDateTime.previousOrSame(dayOfWeek: DayOfWeek): OffsetDateTime
The previous date-time that falls on dayOfWeek, or this date-time if it falls on the same day.
fun ZonedDateTime.previousOrSame(dayOfWeek: DayOfWeek): ZonedDateTime
The previous date-time that falls on dayOfWeek, or this date-time if it falls on the same day.
roundedDownTo
Link copied to clipboard
common
fun DateTime.roundedDownTo(unit: TimeUnit): DateTime
Returns this date-time, rounded down to match the precision of a given unit.
fun Instant.roundedDownTo(unit: TimeUnit): Instant
Returns this instant, rounded down to match the precision of a given unit.
fun OffsetDateTime.roundedDownTo(unit: TimeUnit): OffsetDateTime
Returns this date-time, rounded down to match the precision of a given unit.
fun OffsetTime.roundedDownTo(unit: TimeUnit): OffsetTime
Returns this time, rounded down to match the precision of a given unit.
fun Time.roundedDownTo(unit: TimeUnit): Time
Returns this time, rounded down to match the precision of a given unit.
fun ZonedDateTime.roundedDownTo(unit: TimeUnit): ZonedDateTime
Returns this date-time, rounded down to match the precision of a given unit.
roundedDownToNearest
Link copied to clipboard
common
fun DateTime.roundedDownToNearest(increment: IntHours): DateTime
Returns this date-time, rounded down to the nearest hour that satisfies the increment.
fun DateTime.roundedDownToNearest(increment: IntMicroseconds): DateTime
Returns this date-time, rounded down to the nearest microsecond that satisfies the increment.
fun DateTime.roundedDownToNearest(increment: IntMilliseconds): DateTime
Returns this date-time, rounded down to the nearest millisecond that satisfies the increment.
fun DateTime.roundedDownToNearest(increment: IntMinutes): DateTime
Returns this date-time, rounded down to the nearest minute that satisfies the increment.
fun DateTime.roundedDownToNearest(increment: IntNanoseconds): DateTime
Returns this date-time, rounded down to the nearest nanosecond that satisfies the increment.
fun DateTime.roundedDownToNearest(increment: IntSeconds): DateTime
Returns this date-time, rounded down to the nearest second that satisfies the increment.
fun Instant.roundedDownToNearest(increment: IntHours): Instant
Returns this instant, rounded down to the nearest hour that satisfies the increment.
fun Instant.roundedDownToNearest(increment: IntMicroseconds): Instant
Returns this instant, rounded down to the nearest microsecond that satisfies the increment.
fun Instant.roundedDownToNearest(increment: IntMilliseconds): Instant
Returns this instant, rounded down to the nearest millisecond that satisfies the increment.
fun Instant.roundedDownToNearest(increment: IntMinutes): Instant
Returns this instant, rounded down to the nearest minute that satisfies the increment.
fun Instant.roundedDownToNearest(increment: IntNanoseconds): Instant
Returns this instant, rounded down to the nearest nanosecond that satisfies the increment.
fun Instant.roundedDownToNearest(increment: IntSeconds): Instant
Returns this instant, rounded down to the nearest second that satisfies the increment.
fun OffsetDateTime.roundedDownToNearest(increment: IntHours): OffsetDateTime
Returns this date-time, rounded down to the nearest hour that satisfies the increment.
fun OffsetDateTime.roundedDownToNearest(increment: IntMicroseconds): OffsetDateTime
Returns this date-time, rounded down to the nearest microsecond that satisfies the increment.
fun OffsetDateTime.roundedDownToNearest(increment: IntMilliseconds): OffsetDateTime
Returns this date-time, rounded down to the nearest millisecond that satisfies the increment.
fun OffsetDateTime.roundedDownToNearest(increment: IntMinutes): OffsetDateTime
Returns this date-time, rounded down to the nearest minute that satisfies the increment.
fun OffsetDateTime.roundedDownToNearest(increment: IntNanoseconds): OffsetDateTime
Returns this date-time, rounded down to the nearest nanosecond that satisfies the increment.
fun OffsetDateTime.roundedDownToNearest(increment: IntSeconds): OffsetDateTime
Returns this date-time, rounded down to the nearest second that satisfies the increment.
fun OffsetTime.roundedDownToNearest(increment: IntHours): OffsetTime
Returns this time, rounded down to the nearest hour that satisfies the increment.
fun OffsetTime.roundedDownToNearest(increment: IntMicroseconds): OffsetTime
Returns this time, rounded down to the nearest microsecond that satisfies the increment.
fun OffsetTime.roundedDownToNearest(increment: IntMilliseconds): OffsetTime
Returns this time, rounded down to the nearest millisecond that satisfies the increment.
fun OffsetTime.roundedDownToNearest(increment: IntMinutes): OffsetTime
Returns this time, rounded down to the nearest minute that satisfies the increment.
fun OffsetTime.roundedDownToNearest(increment: IntNanoseconds): OffsetTime
Returns this time, rounded down to the nearest nanosecond that satisfies the increment.
fun OffsetTime.roundedDownToNearest(increment: IntSeconds): OffsetTime
Returns this time, rounded down to the nearest second that satisfies the increment.
fun Time.roundedDownToNearest(increment: IntHours): Time
Returns this time, rounded down to the nearest hour that satisfies the increment.
fun Time.roundedDownToNearest(increment: IntMicroseconds): Time
Returns this time, rounded down to the nearest microsecond that satisfies the increment.
fun Time.roundedDownToNearest(increment: IntMilliseconds): Time
Returns this time, rounded down to the nearest millisecond that satisfies the increment.
fun Time.roundedDownToNearest(increment: IntMinutes): Time
Returns this time, rounded down to the nearest minute that satisfies the increment.
fun Time.roundedDownToNearest(increment: IntNanoseconds): Time
Returns this time, rounded down to the nearest nanosecond that satisfies the increment.
fun Time.roundedDownToNearest(increment: IntSeconds): Time
Returns this time, rounded down to the nearest second that satisfies the increment.
fun ZonedDateTime.roundedDownToNearest(increment: IntHours): ZonedDateTime
Returns this date-time, rounded down to the nearest hour that satisfies the increment.
fun ZonedDateTime.roundedDownToNearest(increment: IntMicroseconds): ZonedDateTime
Returns this date-time, rounded down to the nearest microsecond that satisfies the increment.
fun ZonedDateTime.roundedDownToNearest(increment: IntMilliseconds): ZonedDateTime
Returns this date-time, rounded down to the nearest millisecond that satisfies the increment.
fun ZonedDateTime.roundedDownToNearest(increment: IntMinutes): ZonedDateTime
Returns this date-time, rounded down to the nearest minute that satisfies the increment.
fun ZonedDateTime.roundedDownToNearest(increment: IntNanoseconds): ZonedDateTime
Returns this date-time, rounded down to the nearest nanosecond that satisfies the increment.
fun ZonedDateTime.roundedDownToNearest(increment: IntSeconds): ZonedDateTime
Returns this date-time, rounded down to the nearest second that satisfies the increment.
roundedTo
Link copied to clipboard
common
fun DateTime.roundedTo(unit: TimeUnit): DateTime
Returns this date-time, rounded to match the precision of a given unit.
fun Instant.roundedTo(unit: TimeUnit): Instant
Returns this instant, rounded to match the precision of a given unit.
fun OffsetDateTime.roundedTo(unit: TimeUnit): OffsetDateTime
Returns this date-time, rounded to match the precision of a given unit.
fun OffsetTime.roundedTo(unit: TimeUnit): OffsetTime
Returns this time, rounded to match the precision of a given unit.
fun Time.roundedTo(unit: TimeUnit): Time
Returns this time, rounded to match the precision of a given unit.
fun ZonedDateTime.roundedTo(unit: TimeUnit): ZonedDateTime
Returns this date-time, rounded to match the precision of a given unit.
roundedToNearest
Link copied to clipboard
common
fun DateTime.roundedToNearest(increment: IntHours): DateTime
Returns this date-time, rounded to the nearest hour that satisfies the increment.
fun DateTime.roundedToNearest(increment: IntMicroseconds): DateTime
Returns this date-time, rounded to the nearest microsecond that satisfies the increment.
fun DateTime.roundedToNearest(increment: IntMilliseconds): DateTime
Returns this date-time, rounded to the nearest millisecond that satisfies the increment.
fun DateTime.roundedToNearest(increment: IntMinutes): DateTime
Returns this date-time, rounded to the nearest minute that satisfies the increment.
fun DateTime.roundedToNearest(increment: IntNanoseconds): DateTime
Returns this date-time, rounded to the nearest nanosecond that satisfies the increment.
fun DateTime.roundedToNearest(increment: IntSeconds): DateTime
Returns this date-time, rounded to the nearest second that satisfies the increment.
fun Instant.roundedToNearest(increment: IntHours): Instant
Returns this instant, rounded to the nearest hour that satisfies the increment.
fun Instant.roundedToNearest(increment: IntMicroseconds): Instant
Returns this instant, rounded to the nearest microsecond that satisfies the increment.
fun Instant.roundedToNearest(increment: IntMilliseconds): Instant
Returns this instant, rounded to the nearest millisecond that satisfies the increment.
fun Instant.roundedToNearest(increment: IntMinutes): Instant
Returns this instant, rounded to the nearest minute that satisfies the increment.
fun Instant.roundedToNearest(increment: IntNanoseconds): Instant
Returns this instant, rounded to the nearest nanosecond that satisfies the increment.
fun Instant.roundedToNearest(increment: IntSeconds): Instant
Returns this instant, rounded to the nearest second that satisfies the increment.
fun OffsetDateTime.roundedToNearest(increment: IntHours): OffsetDateTime
Returns this date-time, rounded to the nearest hour that satisfies the increment.
fun OffsetDateTime.roundedToNearest(increment: IntMicroseconds): OffsetDateTime
Returns this date-time, rounded to the nearest microsecond that satisfies the increment.
fun OffsetDateTime.roundedToNearest(increment: IntMilliseconds): OffsetDateTime
Returns this date-time, rounded to the nearest millisecond that satisfies the increment.
fun OffsetDateTime.roundedToNearest(increment: IntMinutes): OffsetDateTime
Returns this date-time, rounded to the nearest minute that satisfies the increment.
fun OffsetDateTime.roundedToNearest(increment: IntNanoseconds): OffsetDateTime
Returns this date-time, rounded to the nearest nanosecond that satisfies the increment.
fun OffsetDateTime.roundedToNearest(increment: IntSeconds): OffsetDateTime
Returns this date-time, rounded to the nearest second that satisfies the increment.
fun OffsetTime.roundedToNearest(increment: IntHours): OffsetTime
Returns this time, rounded to the nearest hour that satisfies the increment.
fun OffsetTime.roundedToNearest(increment: IntMicroseconds): OffsetTime
Returns this time, rounded to the nearest microsecond that satisfies the increment.
fun OffsetTime.roundedToNearest(increment: IntMilliseconds): OffsetTime
Returns this time, rounded to the nearest millisecond that satisfies the increment.
fun OffsetTime.roundedToNearest(increment: IntMinutes): OffsetTime
Returns this time, rounded to the nearest minute that satisfies the increment.
fun OffsetTime.roundedToNearest(increment: IntNanoseconds): OffsetTime
Returns this time, rounded to the nearest nanosecond that satisfies the increment.
fun OffsetTime.roundedToNearest(increment: IntSeconds): OffsetTime
Returns this time, rounded to the nearest second that satisfies the increment.
fun Time.roundedToNearest(increment: IntHours): Time
Returns this time, rounded to the nearest hour that satisfies the increment.
fun Time.roundedToNearest(increment: IntMicroseconds): Time
Returns this time, rounded to the nearest microsecond that satisfies the increment.
fun Time.roundedToNearest(increment: IntMilliseconds): Time
Returns this time, rounded to the nearest millisecond that satisfies the increment.
fun Time.roundedToNearest(increment: IntMinutes): Time
Returns this time, rounded to the nearest minute that satisfies the increment.
fun Time.roundedToNearest(increment: IntNanoseconds): Time
Returns this time, rounded to the nearest nanosecond that satisfies the increment.
fun Time.roundedToNearest(increment: IntSeconds): Time
Returns this time, rounded to the nearest second that satisfies the increment.
fun ZonedDateTime.roundedToNearest(increment: IntHours): ZonedDateTime
Returns this date-time, rounded to the nearest hour that satisfies the increment.
fun ZonedDateTime.roundedToNearest(increment: IntMicroseconds): ZonedDateTime
Returns this date-time, rounded to the nearest microsecond that satisfies the increment.
fun ZonedDateTime.roundedToNearest(increment: IntMilliseconds): ZonedDateTime
Returns this date-time, rounded to the nearest millisecond that satisfies the increment.
fun ZonedDateTime.roundedToNearest(increment: IntMinutes): ZonedDateTime
Returns this date-time, rounded to the nearest minute that satisfies the increment.
fun ZonedDateTime.roundedToNearest(increment: IntNanoseconds): ZonedDateTime
Returns this date-time, rounded to the nearest nanosecond that satisfies the increment.
fun ZonedDateTime.roundedToNearest(increment: IntSeconds): ZonedDateTime
Returns this date-time, rounded to the nearest second that satisfies the increment.
roundedUpTo
Link copied to clipboard
common
fun DateTime.roundedUpTo(unit: TimeUnit): DateTime
Returns this date-time, rounded up to match the precision of a given unit.
fun Instant.roundedUpTo(unit: TimeUnit): Instant
Returns this instant, rounded up to match the precision of a given unit.
fun OffsetDateTime.roundedUpTo(unit: TimeUnit): OffsetDateTime
Returns this date-time, rounded up to match the precision of a given unit.
fun OffsetTime.roundedUpTo(unit: TimeUnit): OffsetTime
Returns this time, rounded up to match the precision of a given unit.
fun Time.roundedUpTo(unit: TimeUnit): Time
Returns this time, rounded up to match the precision of a given unit.
fun ZonedDateTime.roundedUpTo(unit: TimeUnit): ZonedDateTime
Returns this date-time, rounded up to match the precision of a given unit.
roundedUpToNearest
Link copied to clipboard
common
fun DateTime.roundedUpToNearest(increment: IntHours): DateTime
Returns this date-time, rounded up to the nearest hour that satisfies the increment.
fun DateTime.roundedUpToNearest(increment: IntMicroseconds): DateTime
Returns this date-time, rounded up to the nearest microsecond that satisfies the increment.
fun DateTime.roundedUpToNearest(increment: IntMilliseconds): DateTime
Returns this date-time, rounded up to the nearest millisecond that satisfies the increment.
fun DateTime.roundedUpToNearest(increment: IntMinutes): DateTime
Returns this date-time, rounded up to the nearest minute that satisfies the increment.
fun DateTime.roundedUpToNearest(increment: IntNanoseconds): DateTime
Returns this date-time, rounded up to the nearest nanosecond that satisfies the increment.
fun DateTime.roundedUpToNearest(increment: IntSeconds): DateTime
Returns this date-time, rounded up to the nearest second that satisfies the increment.
fun Instant.roundedUpToNearest(increment: IntHours): Instant
Returns this instant, rounded up to the nearest hour that satisfies the increment.
fun Instant.roundedUpToNearest(increment: IntMicroseconds): Instant
Returns this instant, rounded up to the nearest microsecond that satisfies the increment.
fun Instant.roundedUpToNearest(increment: IntMilliseconds): Instant
Returns this instant, rounded up to the nearest millisecond that satisfies the increment.
fun Instant.roundedUpToNearest(increment: IntMinutes): Instant
Returns this instant, rounded up to the nearest minute that satisfies the increment.
fun Instant.roundedUpToNearest(increment: IntNanoseconds): Instant
Returns this instant, rounded up to the nearest nanosecond that satisfies the increment.
fun Instant.roundedUpToNearest(increment: IntSeconds): Instant
Returns this instant, rounded up to the nearest second that satisfies the increment.
fun OffsetDateTime.roundedUpToNearest(increment: IntHours): OffsetDateTime
Returns this date-time, rounded up to the nearest hour that satisfies the increment.
fun OffsetDateTime.roundedUpToNearest(increment: IntMicroseconds): OffsetDateTime
Returns this date-time, rounded up to the nearest microsecond that satisfies the increment.
fun OffsetDateTime.roundedUpToNearest(increment: IntMilliseconds): OffsetDateTime
Returns this date-time, rounded up to the nearest millisecond that satisfies the increment.
fun OffsetDateTime.roundedUpToNearest(increment: IntMinutes): OffsetDateTime
Returns this date-time, rounded up to the nearest minute that satisfies the increment.
fun OffsetDateTime.roundedUpToNearest(increment: IntNanoseconds): OffsetDateTime
Returns this date-time, rounded up to the nearest nanosecond that satisfies the increment.
fun OffsetDateTime.roundedUpToNearest(increment: IntSeconds): OffsetDateTime
Returns this date-time, rounded up to the nearest second that satisfies the increment.
fun OffsetTime.roundedUpToNearest(increment: IntHours): OffsetTime
Returns this time, rounded up to the nearest hour that satisfies the increment.
fun OffsetTime.roundedUpToNearest(increment: IntMicroseconds): OffsetTime
Returns this time, rounded up to the nearest microsecond that satisfies the increment.
fun OffsetTime.roundedUpToNearest(increment: IntMilliseconds): OffsetTime
Returns this time, rounded up to the nearest millisecond that satisfies the increment.
fun OffsetTime.roundedUpToNearest(increment: IntMinutes): OffsetTime
Returns this time, rounded up to the nearest minute that satisfies the increment.
fun OffsetTime.roundedUpToNearest(increment: IntNanoseconds): OffsetTime
Returns this time, rounded up to the nearest nanosecond that satisfies the increment.
fun OffsetTime.roundedUpToNearest(increment: IntSeconds): OffsetTime
Returns this time, rounded up to the nearest second that satisfies the increment.
fun Time.roundedUpToNearest(increment: IntHours): Time
Returns this time, rounded up to the nearest hour that satisfies the increment.
fun Time.roundedUpToNearest(increment: IntMicroseconds): Time
Returns this time, rounded up to the nearest microsecond that satisfies the increment.
fun Time.roundedUpToNearest(increment: IntMilliseconds): Time
Returns this time, rounded up to the nearest millisecond that satisfies the increment.
fun Time.roundedUpToNearest(increment: IntMinutes): Time
Returns this time, rounded up to the nearest minute that satisfies the increment.
fun Time.roundedUpToNearest(increment: IntNanoseconds): Time
Returns this time, rounded up to the nearest nanosecond that satisfies the increment.
fun Time.roundedUpToNearest(increment: IntSeconds): Time
Returns this time, rounded up to the nearest second that satisfies the increment.
fun ZonedDateTime.roundedUpToNearest(increment: IntHours): ZonedDateTime
Returns this date-time, rounded up to the nearest hour that satisfies the increment.
fun ZonedDateTime.roundedUpToNearest(increment: IntMicroseconds): ZonedDateTime
Returns this date-time, rounded up to the nearest microsecond that satisfies the increment.
fun ZonedDateTime.roundedUpToNearest(increment: IntMilliseconds): ZonedDateTime
Returns this date-time, rounded up to the nearest millisecond that satisfies the increment.
fun ZonedDateTime.roundedUpToNearest(increment: IntMinutes): ZonedDateTime
Returns this date-time, rounded up to the nearest minute that satisfies the increment.
fun ZonedDateTime.roundedUpToNearest(increment: IntNanoseconds): ZonedDateTime
Returns this date-time, rounded up to the nearest nanosecond that satisfies the increment.
fun ZonedDateTime.roundedUpToNearest(increment: IntSeconds): ZonedDateTime
Returns this date-time, rounded up to the nearest second that satisfies the increment.
startOfDayAt
Link copied to clipboard
common
fun Date.startOfDayAt(zone: TimeZone): ZonedDateTime
The ZonedDateTime at the start of the day in zone, taking into account any daylight savings transitions.
startOfWeek
Link copied to clipboard
common
fun Date.startOfWeek(settings: WeekSettings): Date
The date at the start of the week that this date falls in.
fun Date.startOfWeek(locale: Locale): Date
The date at the start of the week that this date falls in.
fun DateTime.startOfWeek(settings: WeekSettings): DateTime
The date-time at the first instant of the week that this date-time falls in.
fun DateTime.startOfWeek(locale: Locale): DateTime
The date-time at the first instant of the week that this date-time falls in.
fun OffsetDateTime.startOfWeek(settings: WeekSettings): OffsetDateTime
The date-time at the first instant of the week that this date-time falls in.
fun OffsetDateTime.startOfWeek(locale: Locale): OffsetDateTime
The date-time at the first instant of the week that this date-time falls in.
fun ZonedDateTime.startOfWeek(settings: WeekSettings): ZonedDateTime
The date-time at the first instant of the week that this date-time falls in.
fun ZonedDateTime.startOfWeek(locale: Locale): ZonedDateTime
The date-time at the first instant of the week that this date-time falls in.
TimeZone
Link copied to clipboard
common
fun TimeZone(id: String): TimeZone
Creates a TimeZone from an identifier.
toDate
Link copied to clipboard
common
fun String.toDate(): Date
Converts a string to a Date.
fun String.toDate(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): Date
Converts a string to a Date using a specific parser.
toDateAt
Link copied to clipboard
common
fun Instant.toDateAt(zone: TimeZone): Date
Converts this instant to the corresponding Date in zone.
fun Instant.toDateAt(offset: UtcOffset): Date
Converts this instant to the corresponding Date at offset.
toDateTime
Link copied to clipboard
common
fun String.toDateTime(): DateTime
Convert a string to a DateTime.
fun String.toDateTime(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): DateTime
Converts a string to a DateTime using a specific parser.
toDateTimeAt
Link copied to clipboard
common
fun Instant.toDateTimeAt(zone: TimeZone): DateTime
Converts this instant to the corresponding DateTime in zone.
fun Instant.toDateTimeAt(offset: UtcOffset): DateTime
Converts this instant to the corresponding DateTime at offset.
toDayOfWeek
Link copied to clipboard
common
fun Int.toDayOfWeek(): DayOfWeek
Converts an ISO day of week number to a DayOfWeek.
fun Int.toDayOfWeek(settings: WeekSettings): DayOfWeek
Converts a day of week number (1-7) to a DayOfWeek using the week definition provided by settings.
toInstant
Link copied to clipboard
common
fun OffsetDateTime.toInstant(): Instant
Converts this date-time to an Instant representing the same time point.
fun ZonedDateTime.toInstant(): Instant
Converts this date-time to an Instant representing the same time point.
fun String.toInstant(): Instant
Converts a string to an Instant.
fun String.toInstant(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): Instant
Converts a string to an Instant using a specific parser.
toInstantAt
Link copied to clipboard
common
fun DateTime.toInstantAt(offset: UtcOffset): Instant
Converts this date-time to the corresponding Instant at offset.
toMonth
Link copied to clipboard
common
fun Int.toMonth(): Month
Converts an ISO month number, from 1-12, to a Month.
toOffsetDateTime
Link copied to clipboard
common
fun ZonedDateTime.toOffsetDateTime(): OffsetDateTime
Returns the combined date, time, and UTC offset.
fun String.toOffsetDateTime(): OffsetDateTime
Converts a string to an OffsetDateTime.
fun String.toOffsetDateTime(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): OffsetDateTime
Converts a string to an OffsetDateTime using a specific parser.
toOffsetTime
Link copied to clipboard
common
fun OffsetDateTime.toOffsetTime(): OffsetTime
Returns the combined time and UTC offset.
fun ZonedDateTime.toOffsetTime(): OffsetTime
Returns the combined time and UTC offset.
fun String.toOffsetTime(): OffsetTime
Converts a string to an OffsetTime.
fun String.toOffsetTime(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): OffsetTime
Converts a string to an OffsetTime using a specific parser.
toTime
Link copied to clipboard
common
fun String.toTime(): Time
Converts a string to a Time.
fun String.toTime(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): Time
Converts a string to a Time using a specific parser.
toUtcOffset
Link copied to clipboard
common
fun String.toUtcOffset(): UtcOffset
Converts a string to a UtcOffset.
fun String.toUtcOffset(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): UtcOffset
Converts a string to a UtcOffset using a specific parser.
toWeekDate
Link copied to clipboard
common
inline fun <T> Date.toWeekDate(action: (year: Int, week: Int, day: Int) -> T): T
Converts this date to an ISO week date representation.
inline fun <T> Date.toWeekDate(settings: WeekSettings, action: (year: Int, week: Int, day: Int) -> T): T
Converts this date to a week date representation using the week definition in settings.
inline fun <T> Date.toWeekDate(locale: Locale, action: (year: Int, week: Int, day: Int) -> T): T
Converts this date to a week date representation using the week definition associated with the provided locale.
toYear
Link copied to clipboard
common
fun Date.toYear(): Year
Returns this date with the precision reduced to the year.
fun DateTime.toYear(): Year
Returns this date-time with the precision reduced to the year.
fun OffsetDateTime.toYear(): Year
Returns this date-time with the precision reduced to the year.
fun YearMonth.toYear(): Year
Returns this year-month with the precision reduced to the year.
fun ZonedDateTime.toYear(): Year
Returns this date-time with the precision reduced to the year.
fun String.toYear(): Year
Converts a string to a Year.
fun String.toYear(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): Year
Converts a string to a Year using a specific parser.
toYearMonth
Link copied to clipboard
common
fun Date.toYearMonth(): YearMonth
Returns this date with the precision reduced to the month.
fun DateTime.toYearMonth(): YearMonth
Returns this date-time with the precision reduced to the month.
fun OffsetDateTime.toYearMonth(): YearMonth
Returns this date-time with the precision reduced to the month.
fun ZonedDateTime.toYearMonth(): YearMonth
Returns this date-time with the precision reduced to the month.
fun String.toYearMonth(): YearMonth
Converts a string to a YearMonth.
fun String.toYearMonth(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): YearMonth
Converts a string to a YearMonth using a specific parser.
toZonedDateTime
Link copied to clipboard
common
fun String.toZonedDateTime(): ZonedDateTime
Converts a string to a ZonedDateTime.
fun OffsetDateTime.toZonedDateTime(zone: TimeZone, strategy: OffsetConversionStrategy): ZonedDateTime
Converts this OffsetDateTime to a ZonedDateTime using the specified strategy to adjust it to a valid date, time, and offset in zone.
fun String.toZonedDateTime(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): ZonedDateTime
Converts a string to a ZonedDateTime using a specific parser.
truncatedTo
Link copied to clipboard
common
fun DateTime.truncatedTo(unit: TimeUnit): DateTime
Returns this date-time, rounded down to match the precision of a given unit.
fun Instant.truncatedTo(unit: TimeUnit): Instant
Returns this instant, rounded down to match the precision of a given unit.
fun OffsetDateTime.truncatedTo(unit: TimeUnit): OffsetDateTime
Returns this date-time, rounded down to match the precision of a given unit.
fun OffsetTime.truncatedTo(unit: TimeUnit): OffsetTime
Returns this time, rounded down to match the precision of a given unit.
fun Time.truncatedTo(unit: TimeUnit): Time
Returns this time, rounded down to match the precision of a given unit.
fun ZonedDateTime.truncatedTo(unit: TimeUnit): ZonedDateTime
Returns this date-time, rounded down to match the precision of a given unit.
UtcOffset
Link copied to clipboard
common
fun UtcOffset(hours: IntHours, minutes: IntMinutes = 0.minutes, seconds: IntSeconds = 0.seconds): UtcOffset
Creates a UTC offset of hours, minutes, and seconds.
week
Link copied to clipboard
common
fun Date.week(settings: WeekSettings): DateRange
The range defining the week that this date falls within.
fun Date.week(locale: Locale): DateRange
The range defining the week that this date falls within.
fun DateTime.week(settings: WeekSettings): DateTimeInterval
The interval defining the week that this date-time falls within.
fun DateTime.week(locale: Locale): DateTimeInterval
The interval defining the week that this date-time falls within.
fun OffsetDateTime.week(settings: WeekSettings): OffsetDateTimeInterval
The interval defining the week that this date-time falls within.
fun OffsetDateTime.week(locale: Locale): OffsetDateTimeInterval
The interval defining the week that this date-time falls within.
fun ZonedDateTime.week(settings: WeekSettings): ZonedDateTimeInterval
The interval defining the week that this date-time falls within.
fun ZonedDateTime.week(locale: Locale): ZonedDateTimeInterval
The interval defining the week that this date-time falls within.
weekBasedYear
Link copied to clipboard
common
fun Date.weekBasedYear(settings: WeekSettings): Int
The week-based year, calculated using the week definition in settings.
fun Date.weekBasedYear(locale: Locale): Int
The week-based year, calculated using the week definition associated with the provided locale.
fun DateTime.weekBasedYear(settings: WeekSettings): Int
The week-based year, calculated using the week definition in settings.
fun DateTime.weekBasedYear(locale: Locale): Int
The week-based year, calculated using the week definition associated with the provided locale.
fun OffsetDateTime.weekBasedYear(settings: WeekSettings): Int
The week-based year, calculated using the week definition in settings.
fun OffsetDateTime.weekBasedYear(locale: Locale): Int
The week-based year, calculated using the week definition associated with the provided locale.
fun ZonedDateTime.weekBasedYear(settings: WeekSettings): Int
The week-based year, calculated using the week definition in settings.
fun ZonedDateTime.weekBasedYear(locale: Locale): Int
The week-based year, calculated using the week definition associated with the provided locale.
weekOfMonth
Link copied to clipboard
common
fun Date.weekOfMonth(settings: WeekSettings): Int
The week of the month, from 0-6, calculated using the week definition in settings.
fun Date.weekOfMonth(locale: Locale): Int
The week of the month, from 0-6, calculated using the default week definition associated with the provided locale.
fun DateTime.weekOfMonth(settings: WeekSettings): Int
The week of the month, from 0-6, calculated using the week definition in settings.
fun DateTime.weekOfMonth(locale: Locale): Int
The week of the month, from 0-6, calculated using the default week definition associated with the provided locale.
fun OffsetDateTime.weekOfMonth(settings: WeekSettings): Int
The week of the month, from 0-6, calculated using the week definition in settings.
fun OffsetDateTime.weekOfMonth(locale: Locale): Int
The week of the month, from 0-6, calculated using the default week definition associated with the provided locale.
fun ZonedDateTime.weekOfMonth(settings: WeekSettings): Int
The week of the month, from 0-6, calculated using the week definition in settings.
fun ZonedDateTime.weekOfMonth(locale: Locale): Int
The week of the month, from 0-6, calculated using the default week definition associated with the provided locale.
weekOfWeekBasedYear
Link copied to clipboard
common
fun Date.weekOfWeekBasedYear(settings: WeekSettings): Int
The week number of the week-based year, calculated using the week definition in settings.
fun Date.weekOfWeekBasedYear(locale: Locale): Int
The week number of the week-based year, calculated using the week definition associated with the provided locale.
fun DateTime.weekOfWeekBasedYear(settings: WeekSettings): Int
The week number of the week-based year, calculated using the week definition in settings.
fun DateTime.weekOfWeekBasedYear(locale: Locale): Int
The week number of the week-based year, calculated using the week definition associated with the provided locale.
fun OffsetDateTime.weekOfWeekBasedYear(settings: WeekSettings): Int
The week number of the week-based year, calculated using the week definition in settings.
fun OffsetDateTime.weekOfWeekBasedYear(locale: Locale): Int
The week number of the week-based year, calculated using the week definition associated with the provided locale.
fun ZonedDateTime.weekOfWeekBasedYear(settings: WeekSettings): Int
The week number of the week-based year, calculated using the week definition in settings.
fun ZonedDateTime.weekOfWeekBasedYear(locale: Locale): Int
The week number of the week-based year, calculated using the week definition associated with the provided locale.
weekOfYear
Link copied to clipboard
common
fun Date.weekOfYear(settings: WeekSettings): Int
The week of the year, calculated using the week definition in settings.
fun Date.weekOfYear(locale: Locale): Int
The week of the year, calculated using the week definition associated with the provided locale.
fun DateTime.weekOfYear(settings: WeekSettings): Int
The week of the year, calculated using the week definition in settings.
fun DateTime.weekOfYear(locale: Locale): Int
The week of the year, calculated using the week definition associated with the provided locale.
fun OffsetDateTime.weekOfYear(settings: WeekSettings): Int
The week of the year, calculated using the week definition in settings.
fun OffsetDateTime.weekOfYear(locale: Locale): Int
The week of the year, calculated using the week definition associated with the provided locale.
fun ZonedDateTime.weekOfYear(settings: WeekSettings): Int
The week of the year, calculated using the week definition in settings.
fun ZonedDateTime.weekOfYear(locale: Locale): Int
The week of the year, calculated using the week definition associated with the provided locale.
ZonedDateTime
Link copied to clipboard
common
fun ZonedDateTime(dateTime: DateTime, zone: TimeZone): ZonedDateTime
Creates a ZonedDateTime from a local date and time.
fun ZonedDateTime(date: Date, time: Time, zone: TimeZone): ZonedDateTime
Creates a ZonedDateTime from a local date and time.
fun ZonedDateTime(year: Int, dayOfYear: Int, hour: Int, minute: Int, second: Int, nanosecond: Int, zone: TimeZone): ZonedDateTime
Creates a ZonedDateTime from a local date and time.
fun ZonedDateTime(year: Int, month: Month, day: Int, hour: Int, minute: Int, second: Int, nanosecond: Int, zone: TimeZone): ZonedDateTime
Creates a ZonedDateTime from a local date and time.
fun ZonedDateTime(year: Int, monthNumber: Int, day: Int, hour: Int, minute: Int, second: Int, nanosecond: Int, zone: TimeZone): ZonedDateTime
Creates a ZonedDateTime from a local date and time.

Properties

endOfDay
Link copied to clipboard
common
val Date.endOfDay: DateTime
The DateTime at the last representable instant of the day.
endOfMonth
Link copied to clipboard
common
val Date.endOfMonth: Date
The date at the end of the month that this date falls in.
endOfMonth
Link copied to clipboard
common
val DateTime.endOfMonth: DateTime
The date-time at the last representable instant of the month that this date-time falls in.
endOfMonth
Link copied to clipboard
common
val OffsetDateTime.endOfMonth: OffsetDateTime
The date-time at the last representable instant of the month that this date-time falls in.
endOfMonth
Link copied to clipboard
common
val ZonedDateTime.endOfMonth: ZonedDateTime
The date-time at the last representable instant of the month that this date-time falls in.
endOfWeek
Link copied to clipboard
common
val Date.endOfWeek: Date
The date at the end of the ISO week that this date falls in.
endOfWeek
Link copied to clipboard
common
val DateTime.endOfWeek: DateTime
The date-time at the last representable instant of the ISO week that this date-time falls in.
endOfWeek
Link copied to clipboard
common
val OffsetDateTime.endOfWeek: OffsetDateTime
The date-time at the last representable instant of the ISO week that this date-time falls in.
endOfWeek
Link copied to clipboard
common
val ZonedDateTime.endOfWeek: ZonedDateTime
The date-time at the last representable instant of the ISO week that this date-time falls in.
endOfYear
Link copied to clipboard
common
val Date.endOfYear: Date
The date at the end of the year that this date falls in.
endOfYear
Link copied to clipboard
common
val DateTime.endOfYear: DateTime
The date-time at the last representable instant of the year that this date-time falls in.
endOfYear
Link copied to clipboard
common
val OffsetDateTime.endOfYear: OffsetDateTime
The date-time at the last representable instant of the year that this date-time falls in.
endOfYear
Link copied to clipboard
common
val ZonedDateTime.endOfYear: ZonedDateTime
The date-time at the last representable instant of the year that this date-time falls in.
isInLeapDay
Link copied to clipboard
common
val DateTime.isInLeapDay: Boolean
Checks if this date-time falls within February 29.
isInLeapDay
Link copied to clipboard
common
val OffsetDateTime.isInLeapDay: Boolean
Checks if this date-time falls within February 29.
isInLeapDay
Link copied to clipboard
common
val ZonedDateTime.isInLeapDay: Boolean
Checks if this date-time falls within February 29.
isInLeapYear
Link copied to clipboard
common
val Date.isInLeapYear: Boolean
Checks if this date falls within a leap year.
isInLeapYear
Link copied to clipboard
common
val DateTime.isInLeapYear: Boolean
Checks if this date-time falls within a leap year.
isInLeapYear
Link copied to clipboard
common
val OffsetDateTime.isInLeapYear: Boolean
Checks if this date-time falls within a leap year.
isInLeapYear
Link copied to clipboard
common
val ZonedDateTime.isInLeapYear: Boolean
Checks if this date-time falls within a leap year.
isLeapDay
Link copied to clipboard
common
val Date.isLeapDay: Boolean
Checks if this date is February 29.
lengthOfMonth
Link copied to clipboard
common
val Date.lengthOfMonth: IntDays
The length of this date's month in days.
lengthOfMonth
Link copied to clipboard
common
val DateTime.lengthOfMonth: IntDays
The length of this date-time's month in days.
lengthOfMonth
Link copied to clipboard
common
val OffsetDateTime.lengthOfMonth: IntDays
The length of this date-time's month in days.
lengthOfMonth
Link copied to clipboard
common
val ZonedDateTime.lengthOfMonth: IntDays
The length of this date-time's month in days.
lengthOfWeekBasedYear
Link copied to clipboard
common
val Date.lengthOfWeekBasedYear: IntWeeks
The length of the ISO week-based year that this date falls in, either 52 or 53 weeks.
lengthOfWeekBasedYear
Link copied to clipboard
common
val DateTime.lengthOfWeekBasedYear: IntWeeks
The length of the ISO week-based year that this date-time falls in, either 52 or 53 weeks.
lengthOfWeekBasedYear
Link copied to clipboard
common
val OffsetDateTime.lengthOfWeekBasedYear: IntWeeks
The length of the ISO week-based year that this date-time falls in, either 52 or 53 weeks.
lengthOfWeekBasedYear
Link copied to clipboard
common
val ZonedDateTime.lengthOfWeekBasedYear: IntWeeks
The length of the ISO week-based year that this date-time falls in, either 52 or 53 weeks.
lengthOfYear
Link copied to clipboard
common
val Date.lengthOfYear: IntDays
The length of this date's year in days.
lengthOfYear
Link copied to clipboard
common
val DateTime.lengthOfYear: IntDays
The length of this date-time's year in days.
lengthOfYear
Link copied to clipboard
common
val OffsetDateTime.lengthOfYear: IntDays
The length of this date-time's year in days.
lengthOfYear
Link copied to clipboard
common
val ZonedDateTime.lengthOfYear: IntDays
The length of this date-time's year in days.
startOfDay
Link copied to clipboard
common
val Date.startOfDay: DateTime
The DateTime at the start of the day.
startOfMonth
Link copied to clipboard
common
val Date.startOfMonth: Date
The date at the start of the month that this date falls in.
startOfMonth
Link copied to clipboard
common
val DateTime.startOfMonth: DateTime
The date-time at the first instant of the month that this date-time falls in.
startOfMonth
Link copied to clipboard
common
val OffsetDateTime.startOfMonth: OffsetDateTime
The date-time at the first instant of the month that this date-time falls in.
startOfMonth
Link copied to clipboard
common
val ZonedDateTime.startOfMonth: ZonedDateTime
The date-time at the first instant of the month that this date-time falls in.
startOfWeek
Link copied to clipboard
common
val Date.startOfWeek: Date
The date at the start of the ISO week that this date falls in.
startOfWeek
Link copied to clipboard
common
val DateTime.startOfWeek: DateTime
The date-time at the first instant of the ISO week that this date-time falls in.
startOfWeek
Link copied to clipboard
common
val OffsetDateTime.startOfWeek: OffsetDateTime
The date-time at the first instant of the ISO week that this date-time falls in.
startOfWeek
Link copied to clipboard
common
val ZonedDateTime.startOfWeek: ZonedDateTime
The date-time at the first instant of the ISO week that this date-time falls in.
startOfYear
Link copied to clipboard
common
val Date.startOfYear: Date
The date at the start of the year that this date falls in.
startOfYear
Link copied to clipboard
common
val DateTime.startOfYear: DateTime
The date-time at the first instant of the year that this date-time falls in.
startOfYear
Link copied to clipboard
common
val OffsetDateTime.startOfYear: OffsetDateTime
The date-time at the first instant of the year that this date-time falls in.
startOfYear
Link copied to clipboard
common
val ZonedDateTime.startOfYear: ZonedDateTime
The date-time at the first instant of the year that this date-time falls in.
week
Link copied to clipboard
common
val Date.week: DateRange
The range defining the ISO week that this date falls within.
week
Link copied to clipboard
common
val DateTime.week: DateTimeInterval
The interval defining the ISO week that this date-time falls within.
week
Link copied to clipboard
common
val OffsetDateTime.week: OffsetDateTimeInterval
The interval defining the ISO week that this date-time falls within.
week
Link copied to clipboard
common
val ZonedDateTime.week: ZonedDateTimeInterval
The interval defining the ISO week that this date-time falls within.
weekBasedYear
Link copied to clipboard
common
val Date.weekBasedYear: Int
The week-based year used in the ISO week date system.
weekBasedYear
Link copied to clipboard
common
val DateTime.weekBasedYear: Int
The week-based year used in the ISO week date system.
weekBasedYear
Link copied to clipboard
common
val OffsetDateTime.weekBasedYear: Int
The week-based year used in the ISO week date system.
weekBasedYear
Link copied to clipboard
common
val ZonedDateTime.weekBasedYear: Int
The week-based year used in the ISO week date system.
weekOfMonth
Link copied to clipboard
common
val Date.weekOfMonth: Int
The week of the month, from 0-6, calculated using the ISO week definition.
weekOfMonth
Link copied to clipboard
common
val DateTime.weekOfMonth: Int
The week of the month, from 0-6, calculated using the ISO week definition.
weekOfMonth
Link copied to clipboard
common
val OffsetDateTime.weekOfMonth: Int
The week of the month, from 0-6, calculated using the ISO week definition.
weekOfMonth
Link copied to clipboard
common
val ZonedDateTime.weekOfMonth: Int
The week of the month, from 0-6, calculated using the ISO week definition.
weekOfWeekBasedYear
Link copied to clipboard
common
val Date.weekOfWeekBasedYear: Int
The week number used in the ISO week date system.
weekOfWeekBasedYear
Link copied to clipboard
common
val DateTime.weekOfWeekBasedYear: Int
The week number used in the ISO week date system.
weekOfWeekBasedYear
Link copied to clipboard
common
val OffsetDateTime.weekOfWeekBasedYear: Int
The week number used in the ISO week date system.
weekOfWeekBasedYear
Link copied to clipboard
common
val ZonedDateTime.weekOfWeekBasedYear: Int
The week number used in the ISO week date system.
weekOfYear
Link copied to clipboard
common
val Date.weekOfYear: Int
The week of the year, calculated using the ISO week definition.
weekOfYear
Link copied to clipboard
common
val DateTime.weekOfYear: Int
The week of the year, calculated using the ISO week definition.
weekOfYear
Link copied to clipboard
common
val OffsetDateTime.weekOfYear: Int
The week of the year, calculated using the ISO week definition.
weekOfYear
Link copied to clipboard
common
val ZonedDateTime.weekOfYear: Int
The week of the year, calculated using the ISO week definition.