Offset Date Time
class OffsetDateTime(dateTime: DateTime, offset: UtcOffset) : TimePoint<OffsetDateTime>
Content copied to clipboard
A date and time of day with an offset from UTC.
OffsetDateTime is intended to be used primarily for use cases involving persistence or network transfer where the application of time zone rules may be undesirable. For most applications, ZonedDateTime is a better choice since it takes time zone rules into account when performing calendrical calculations.
Parameters
dateTime
the local date and time of day
offset
the offset from UTC
Throws
if the offset is invalid
Constructors
OffsetDateTime
Link copied to clipboard
Creates an OffsetDateTime.
OffsetDateTime
Link copied to clipboard
fun OffsetDateTime(year: Int, month: Month, dayOfMonth: Int, hour: Int, minute: Int, second: Int, nanosecond: Int, offset: UtcOffset)
Content copied to clipboard
Creates an OffsetDateTime.
OffsetDateTime
Link copied to clipboard
fun OffsetDateTime(year: Int, monthNumber: Int, dayOfMonth: Int, hour: Int, minute: Int, second: Int, nanosecond: Int, offset: UtcOffset)
Content copied to clipboard
Creates an OffsetDateTime.
OffsetDateTime
Link copied to clipboard
fun OffsetDateTime(year: Int, dayOfYear: Int, hour: Int, minute: Int, second: Int, nanosecond: Int, offset: UtcOffset)
Content copied to clipboard
Creates an OffsetDateTime.
OffsetDateTime
Link copied to clipboard
Types
Functions
adjustedTo
Link copied to clipboard
Changes the offset of this OffsetDateTime, adjusting the date and time components such that the instant represented by it remains the same.
copy
Link copied to clipboard
fun copy(dateTime: DateTime = this.dateTime, offset: UtcOffset = this.offset): OffsetDateTime
Content copied to clipboard
fun copy(date: Date = this.date, time: Time = this.time, offset: UtcOffset = this.offset): OffsetDateTime
Content copied to clipboard
isSameInstantAs
Link copied to clipboard
minus
Link copied to clipboard
open operator override fun minus(microseconds: IntMicroseconds): OffsetDateTime
Content copied to clipboard
open operator override fun minus(milliseconds: IntMilliseconds): OffsetDateTime
Content copied to clipboard
open operator override fun minus(nanoseconds: IntNanoseconds): OffsetDateTime
Content copied to clipboard
open operator override fun minus(microseconds: LongMicroseconds): OffsetDateTime
Content copied to clipboard
open operator override fun minus(milliseconds: LongMilliseconds): OffsetDateTime
Content copied to clipboard
open operator override fun minus(nanoseconds: LongNanoseconds): OffsetDateTime
Content copied to clipboard
plus
Link copied to clipboard
open operator override fun plus(microseconds: IntMicroseconds): OffsetDateTime
Content copied to clipboard
open operator override fun plus(milliseconds: IntMilliseconds): OffsetDateTime
Content copied to clipboard
open operator override fun plus(nanoseconds: IntNanoseconds): OffsetDateTime
Content copied to clipboard
open operator override fun plus(microseconds: LongMicroseconds): OffsetDateTime
Content copied to clipboard
open operator override fun plus(milliseconds: LongMilliseconds): OffsetDateTime
Content copied to clipboard
open operator override fun plus(nanoseconds: LongNanoseconds): OffsetDateTime
Content copied to clipboard
rangeTo
Link copied to clipboard
Properties
additionalNanosecondsSinceUnixEpoch
Link copied to clipboard
The number of additional nanoseconds on top of secondsSinceUnixEpoch.
dayOfMonth
Link copied to clipboard
millisecondOfUnixEpoch
Link copied to clipboard
millisecondsSinceUnixEpoch
Link copied to clipboard
monthNumber
Link copied to clipboard
nanosecond
Link copied to clipboard
secondOfUnixEpoch
Link copied to clipboard
secondsSinceUnixEpoch
Link copied to clipboard
Extensions
asZonedDateTime
Link copied to clipboard
endOfMonth
Link copied to clipboard
endOfWeek
Link copied to clipboard
endOfYear
Link copied to clipboard
isInLeapDay
Link copied to clipboard
isInLeapYear
Link copied to clipboard
lengthOfMonth
Link copied to clipboard
lengthOfWeekBasedYear
Link copied to clipboard
lengthOfYear
Link copied to clipboard
next
Link copied to clipboard
nextOrSame
Link copied to clipboard
previous
Link copied to clipboard
previousOrSame
Link copied to clipboard
roundedDownTo
Link copied to clipboard
roundedDownToNearest
Link copied to clipboard
fun OffsetDateTime.roundedDownToNearest(increment: IntHours): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedDownToNearest(increment: IntMinutes): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedDownToNearest(increment: IntSeconds): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedDownToNearest(increment: IntMilliseconds): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedDownToNearest(increment: IntMicroseconds): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedDownToNearest(increment: IntNanoseconds): OffsetDateTime
Content copied to clipboard
roundedTo
Link copied to clipboard
roundedToNearest
Link copied to clipboard
fun OffsetDateTime.roundedToNearest(increment: IntMinutes): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedToNearest(increment: IntSeconds): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedToNearest(increment: IntMilliseconds): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedToNearest(increment: IntMicroseconds): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedToNearest(increment: IntNanoseconds): OffsetDateTime
Content copied to clipboard
roundedUpTo
Link copied to clipboard
roundedUpToNearest
Link copied to clipboard
fun OffsetDateTime.roundedUpToNearest(increment: IntHours): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedUpToNearest(increment: IntMinutes): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedUpToNearest(increment: IntSeconds): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedUpToNearest(increment: IntMilliseconds): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedUpToNearest(increment: IntMicroseconds): OffsetDateTime
Content copied to clipboard
fun OffsetDateTime.roundedUpToNearest(increment: IntNanoseconds): OffsetDateTime
Content copied to clipboard
startOfMonth
Link copied to clipboard
startOfWeek
Link copied to clipboard
startOfYear
Link copied to clipboard
toJavaOffsetDateTime
Link copied to clipboard
toNSDateComponents
Link copied to clipboard
fun OffsetDateTime.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>
Content copied to clipboard
toOffsetTime
Link copied to clipboard
toYear
Link copied to clipboard
toYearMonth
Link copied to clipboard
toZonedDateTime
Link copied to clipboard
fun OffsetDateTime.toZonedDateTime(zone: TimeZone, strategy: OffsetConversionStrategy): ZonedDateTime
Content copied to clipboard
Converts this OffsetDateTime to a ZonedDateTime using the specified strategy to adjust it to a valid date, time, and offset in zone.
truncatedTo
Link copied to clipboard
until
Link copied to clipboard
infix fun OffsetDateTime.until(to: OffsetDateTime): OffsetDateTimeInterval
Content copied to clipboard
week
Link copied to clipboard
weekBasedYear
Link copied to clipboard
weekOfMonth
Link copied to clipboard
weekOfWeekBasedYear
Link copied to clipboard
weekOfYear
Link copied to clipboard