trait Zoned[A] extends TimePoint[A] with Capture[A] with Serializable
A typeclass for zoned datetime values. These values are zone aware and follow DST transformation rules.
Semantics are similar to java.time.ZonedDateTime
- Annotations
- @implicitNotFound("Could not find an instance of Zoned for ${A}")
- Alphabetic
- By Inheritance
- Zoned
- Capture
- TimePoint
- Order
- PartialOrder
- Eq
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def capture(date: LocalDate, time: LocalTime, zone: TimeZoneId): A
Java time based constructor for values of type A.
Java time based constructor for values of type A. Resulting time point will match specified local date and time at specified zone.
- date
local date part of A
- time
local time part of A
- zone
time zone context for specified local date and time
- Definition Classes
- Capture
- abstract def compare(x: A, y: A): Int
- Definition Classes
- Order
- abstract def date(x: A): LocalDate
Date part of x
Date part of x
- Definition Classes
- TimePoint
- abstract def dayOfMonth(x: A): Int
- Definition Classes
- TimePoint
- abstract def dayOfWeek(x: A): DayOfWeek
- Definition Classes
- TimePoint
- abstract def daysUntil(x: A, until: A): Long
Returns number of full days between two datetime values.
Returns number of full days between two datetime values. Result can be negative if
until
<x
- Definition Classes
- TimePoint
- abstract def hour(x: A): Int
- Definition Classes
- TimePoint
- abstract def hoursUntil(x: A, until: A): Long
Returns number of full hours between two datetime values.
Returns number of full hours between two datetime values. Result can be negative if
until
<x
- Definition Classes
- TimePoint
- abstract def millisecond(x: A): Int
- Definition Classes
- TimePoint
- abstract def millisecondsUntil(x: A, until: A): Long
Returns number of milliseconds between two datetime values.
Returns number of milliseconds between two datetime values. Result can be negative if
until
<x
- Definition Classes
- TimePoint
- abstract def minus(x: A, d: Duration): A
Subtract a (possibly negative) duration from this datetime
Subtract a (possibly negative) duration from this datetime
- Definition Classes
- TimePoint
- abstract def minute(x: A): Int
- Definition Classes
- TimePoint
- abstract def minutesUntil(x: A, until: A): Long
Returns number of full minutes between two datetime values.
Returns number of full minutes between two datetime values. Result can be negative if
until
<x
- Definition Classes
- TimePoint
- abstract def month(x: A): Int
- Definition Classes
- TimePoint
- abstract def monthsUntil(x: A, until: A): Long
Returns number of full months between two datetime values.
Returns number of full months between two datetime values. Result can be negative if
until
<x
- Definition Classes
- TimePoint
- abstract def offset(x: A): Offset
UTC offset of this datetime value
- abstract def plus(x: A, d: Duration): A
Add a (possibly negative) duration to this datetime
Add a (possibly negative) duration to this datetime
- Definition Classes
- TimePoint
- abstract def plusDays(x: A, days: Int): A
Add a (possibly negative) number of months to this datetime.
Add a (possibly negative) number of months to this datetime.
- Definition Classes
- TimePoint
- abstract def plusMonths(x: A, months: Int): A
Add a (possibly negative) number of months to this datetime.
Add a (possibly negative) number of months to this datetime.
- Definition Classes
- TimePoint
- abstract def plusYears(x: A, years: Int): A
Add a (possibly negative) number of years to this datetime.
Add a (possibly negative) number of years to this datetime.
- Definition Classes
- TimePoint
- abstract def second(x: A): Int
- Definition Classes
- TimePoint
- abstract def secondsUntil(x: A, until: A): Long
Returns number of full seconds between two datetime values.
Returns number of full seconds between two datetime values. Result can be negative if
until
<x
- Definition Classes
- TimePoint
- abstract def time(x: A): LocalTime
Time part of x
Time part of x
- Definition Classes
- TimePoint
- abstract def utc(x: A): (LocalDate, LocalTime)
Get UTC date and time for this instant
Get UTC date and time for this instant
- Definition Classes
- TimePoint
- abstract def withDate(x: A, date: LocalDate): A
Create a copy of
x
with date part updated to supplied one. - abstract def withDayOfMonth(x: A, dayOfMonth: Int): A
Create a copy of
x
with day of month altered.Create a copy of
x
with day of month altered.- Definition Classes
- TimePoint
- abstract def withHour(x: A, hour: Int): A
Create a copy of
x
with hour of day altered.Create a copy of
x
with hour of day altered.- Definition Classes
- TimePoint
- abstract def withMillisecond(x: A, millisecond: Int): A
Create a copy of
x
with millisecond of second altered.Create a copy of
x
with millisecond of second altered.- Definition Classes
- TimePoint
- abstract def withMinute(x: A, minute: Int): A
Create a copy of
x
with minute if hour altered.Create a copy of
x
with minute if hour altered.- Definition Classes
- TimePoint
- abstract def withMonth(x: A, month: Int): A
Create a copy of
x
with month altered.Create a copy of
x
with month altered. Month value has to be in [1,12] range- Definition Classes
- TimePoint
- abstract def withSecond(x: A, second: Int): A
Create a copy of
x
with second of minute altered.Create a copy of
x
with second of minute altered.- Definition Classes
- TimePoint
- abstract def withTime(x: A, time: LocalTime): A
Create a copy of
x
with time part updated to supplied one. - abstract def withYear(x: A, year: Int): A
Create a copy of
x
with year altered.Create a copy of
x
with year altered.- Definition Classes
- TimePoint
- abstract def withZoneSameInstant(x: A, zone: TimeZoneId): A
Returns a new date time value with timezone altered in a way, that preserves exact moment in time, described by
x
Returns a new date time value with timezone altered in a way, that preserves exact moment in time, described by
x
- x
original date-time
- zone
time zone to create new value in
- abstract def withZoneSameLocal(x: A, zone: TimeZoneId): A
Returns a new date time value with timezone altered.
Returns a new date time value with timezone altered. Local date and time stay the same.
This means that if supplied zone has different offset, new value will have different instant.
- x
original date-time
- zone
time zone to create new value in
- abstract def year(x: A): Int
- Definition Classes
- TimePoint
- abstract def yearsUntil(x: A, until: A): Long
Returns number of full years between two datetime values.
Returns number of full years between two datetime values. Result can be negative if
until
<x
- Definition Classes
- TimePoint
- abstract def zone(x: A): TimeZoneId
Get the timezone of x
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def comparison(x: A, y: A): Comparison
- Definition Classes
- Order
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def eqv(x: A, y: A): Boolean
- Definition Classes
- Order → PartialOrder → Eq
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def gt(x: A, y: A): Boolean
- Definition Classes
- Order → PartialOrder
- def gteqv(x: A, y: A): Boolean
- Definition Classes
- Order → PartialOrder
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isAfter(x: A, y: A): Boolean
- Definition Classes
- TimePoint
- def isAfterOrEquals(x: A, y: A): Boolean
- Definition Classes
- TimePoint
- def isBefore(x: A, y: A): Boolean
- Definition Classes
- TimePoint
- def isBeforeOrEquals(x: A, y: A): Boolean
- Definition Classes
- TimePoint
- def isEqual(x: A, y: A): Boolean
- Definition Classes
- TimePoint
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lt(x: A, y: A): Boolean
- Definition Classes
- Order → PartialOrder
- def lteqv(x: A, y: A): Boolean
- Definition Classes
- Order → PartialOrder
- def max(x: A, y: A): A
- Definition Classes
- Order
- def min(x: A, y: A): A
- Definition Classes
- Order
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def neqv(x: A, y: A): Boolean
- Definition Classes
- Order → Eq
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def partialCompare(x: A, y: A): Double
- Definition Classes
- Order → PartialOrder
- def partialComparison(x: A, y: A): Option[Comparison]
- Definition Classes
- PartialOrder
- def pmax(x: A, y: A): Option[A]
- Definition Classes
- PartialOrder
- def pmin(x: A, y: A): Option[A]
- Definition Classes
- PartialOrder
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toOrdering: Ordering[A]
- Definition Classes
- Order
- def toString(): String
- Definition Classes
- AnyRef → Any
- def tryCompare(x: A, y: A): Option[Int]
- Definition Classes
- PartialOrder
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()