A set of convenience operators for various date-time primitives, enabling things like date.next(TUESDAY), date.startOfWeek, or dateTime.truncatedToMilliseconds().
(iosArm64, iosX64, jvm, macosX64)
endOfMonth |
The date at the end of the month that this date falls in. val Date.endOfMonth: Date
The date-time at the last representable instant of the month that this date-time falls in. val DateTime.endOfMonth: DateTimeval OffsetDateTime.endOfMonth: OffsetDateTimeval ZonedDateTime.endOfMonth: ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
endOfWeek |
The date at the end of the ISO week that this date falls in. val Date.endOfWeek: Date
The date-time at the last representable instant of the ISO week that this date-time falls in. val DateTime.endOfWeek: DateTimeval OffsetDateTime.endOfWeek: OffsetDateTimeval ZonedDateTime.endOfWeek: ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
endOfYear |
The date at the end of the year that this date falls in. val Date.endOfYear: Date
The date-time at the last representable instant of the year that this date-time falls in. val DateTime.endOfYear: DateTimeval OffsetDateTime.endOfYear: OffsetDateTimeval ZonedDateTime.endOfYear: ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
startOfMonth |
The date at the start of the month that this date falls in. val Date.startOfMonth: Date
The date-time at the first instant of the month that this date-time falls in. val DateTime.startOfMonth: DateTimeval OffsetDateTime.startOfMonth: OffsetDateTimeval ZonedDateTime.startOfMonth: ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
startOfWeek |
The date at the start of the ISO week that this date falls in. val Date.startOfWeek: Date
The date-time at the first instant of the ISO week that this date-time falls in. val DateTime.startOfWeek: DateTimeval OffsetDateTime.startOfWeek: OffsetDateTimeval ZonedDateTime.startOfWeek: ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
startOfYear |
The date at the start of the year that this date falls in. val Date.startOfYear: Date
The date-time at the first instant of the year that this date-time falls in. val DateTime.startOfYear: DateTimeval OffsetDateTime.startOfYear: OffsetDateTimeval ZonedDateTime.startOfYear: ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
next |
The next date after this one that falls on a particular day of the week. fun Date.next(dayOfWeek: DayOfWeek): Date
The next date-time after this one that falls on a particular day of the week. fun DateTime.next(dayOfWeek: DayOfWeek): DateTimefun OffsetDateTime.next(dayOfWeek: DayOfWeek): OffsetDateTimefun ZonedDateTime.next(dayOfWeek: DayOfWeek): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
nextOrSame |
The next date that falls on a particular day of the week, or this one if it falls on the same day. fun Date.nextOrSame(dayOfWeek: DayOfWeek): Date
The next date-time that falls on a particular day of the week, or this one if it falls on the same day. fun DateTime.nextOrSame(dayOfWeek: DayOfWeek): DateTimefun OffsetDateTime.nextOrSame(dayOfWeek: DayOfWeek): OffsetDateTimefun ZonedDateTime.nextOrSame(dayOfWeek: DayOfWeek): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
previous |
The last date before this one that falls on a particular day of the week. fun Date.previous(dayOfWeek: DayOfWeek): Date
The last date-time before this one that falls on a particular day of the week. fun DateTime.previous(dayOfWeek: DayOfWeek): DateTimefun OffsetDateTime.previous(dayOfWeek: DayOfWeek): OffsetDateTimefun ZonedDateTime.previous(dayOfWeek: DayOfWeek): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
previousOrSame |
The last date that falls on a particular day of the week, or this one if it falls on the same day. fun Date.previousOrSame(dayOfWeek: DayOfWeek): Date
The last date-time that falls on a particular day of the week, or this one if it falls on the same day. fun DateTime.previousOrSame(dayOfWeek: DayOfWeek): DateTimefun OffsetDateTime.previousOrSame(dayOfWeek: DayOfWeek): OffsetDateTimefun ZonedDateTime.previousOrSame(dayOfWeek: DayOfWeek): ZonedDateTime |
(iosArm64, iosX64, jvm, macosX64)
truncatedToHours |
Return a copy of this time, truncated to the fun Time.truncatedToHours(): Timefun OffsetTime.truncatedToHours(): OffsetTime
Return a copy of this date-time, truncated to the fun DateTime.truncatedToHours(): DateTimefun ZonedDateTime.truncatedToHours(): ZonedDateTimefun OffsetDateTime.truncatedToHours(): OffsetDateTime |
(iosArm64, iosX64, jvm, macosX64)
truncatedToMicroseconds |
Return a copy of this time with the fun Time.truncatedToMicroseconds(): Timefun OffsetTime.truncatedToMicroseconds(): OffsetTime
Return a copy of this date-time with the fun DateTime.truncatedToMicroseconds(): DateTimefun ZonedDateTime.truncatedToMicroseconds(): ZonedDateTimefun OffsetDateTime.truncatedToMicroseconds(): OffsetDateTime |
(iosArm64, iosX64, jvm, macosX64)
truncatedToMilliseconds |
Return a copy of this time with the fun Time.truncatedToMilliseconds(): Timefun OffsetTime.truncatedToMilliseconds(): OffsetTime
Return a copy of this date-time with the fun DateTime.truncatedToMilliseconds(): DateTimefun ZonedDateTime.truncatedToMilliseconds(): ZonedDateTimefun OffsetDateTime.truncatedToMilliseconds(): OffsetDateTime |
(iosArm64, iosX64, jvm, macosX64)
truncatedToMinutes |
Return a copy of this time, truncated to the fun Time.truncatedToMinutes(): Time
Return a copy of this date-time, truncated to the fun DateTime.truncatedToMinutes(): DateTimefun OffsetDateTime.truncatedToMinutes(): OffsetDateTime
Return a copy of this date-time, truncated to the fun ZonedDateTime.truncatedToMinutes(): ZonedDateTime
Return a copy of this time, truncated to the fun OffsetTime.truncatedToMinutes(): OffsetTime |
(iosArm64, iosX64, jvm, macosX64)
truncatedToSeconds |
Return a copy of this time, truncated to the fun Time.truncatedToSeconds(): Timefun OffsetTime.truncatedToSeconds(): OffsetTime
Return a copy of this date-time, truncated to the fun DateTime.truncatedToSeconds(): DateTimefun ZonedDateTime.truncatedToSeconds(): ZonedDateTimefun OffsetDateTime.truncatedToSeconds(): OffsetDateTime |