object ZoneOffset extends Serializable
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- ZoneOffset
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
lazy val
MAX: ZoneOffset
Constant for the maximum supported offset.
-
lazy val
MIN: ZoneOffset
Constant for the maximum supported offset.
-
lazy val
UTC: ZoneOffset
The time-zone offset for UTC, with an ID of 'Z'.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
from(temporal: TemporalAccessor): ZoneOffset
Obtains an instance of
ZoneOffset
from a temporal object.Obtains an instance of
ZoneOffset
from a temporal object.A
TemporalAccessor
represents some form of date and time information. This factory converts the arbitrary temporal object to an instance ofZoneOffset
.The conversion uses the
TemporalQueries#offset()
query, which relies on extracting theOFFSET_SECONDS
field.This method matches the signature of the functional interface
TemporalQuery
allowing it to be used in queries via method reference,ZoneOffset::from
.- temporal
the temporal object to convert, not null
- returns
the zone-offset, not null
- Exceptions thrown
DateTimeException
if unable to convert to an { @code ZoneOffset}
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
of(offsetId: String): ZoneOffset
Obtains an instance of
ZoneOffset
using the ID.Obtains an instance of
ZoneOffset
using the ID.This method parses the string ID of a
ZoneOffset
to return an instance. The parsing accepts all the formats generated by#getId()
, plus some additional formats:Z
- for UTC+h
+hh
+hh:mm
-hh:mm
+hhmm
-hhmm
+hh:mm:ss
-hh:mm:ss
+hhmmss
-hhmmss
Note that ± means either the plus or minus symbol.
The ID of the returned offset will be normalized to one of the formats described by
#getId()
.The maximum supported range is from +18:00 to -18:00 inclusive.
- offsetId
the offset ID, not null
- returns
the zone-offset, not null
- Exceptions thrown
DateTimeException
if the offset ID is invalid
-
def
ofHours(hours: Int): ZoneOffset
Obtains an instance of
ZoneOffset
using an offset in hours.Obtains an instance of
ZoneOffset
using an offset in hours.- hours
the time-zone offset in hours, from -18 to +18
- returns
the zone-offset, not null
- Exceptions thrown
DateTimeException
if the offset is not in the required range
-
def
ofHoursMinutes(hours: Int, minutes: Int): ZoneOffset
Obtains an instance of
ZoneOffset
using an offset in hours and minutes.Obtains an instance of
ZoneOffset
using an offset in hours and minutes.The sign of the hours and minutes components must match. Thus, if the hours is negative, the minutes must be negative or zero. If the hours is zero, the minutes may be positive, negative or zero.
- hours
the time-zone offset in hours, from -18 to +18
- minutes
the time-zone offset in minutes, from 0 to ±59, sign matches hours
- returns
the zone-offset, not null
- Exceptions thrown
DateTimeException
if the offset is not in the required range
-
def
ofHoursMinutesSeconds(hours: Int, minutes: Int, seconds: Int): ZoneOffset
Obtains an instance of
ZoneOffset
using an offset in hours, minutes and seconds.Obtains an instance of
ZoneOffset
using an offset in hours, minutes and seconds.The sign of the hours, minutes and seconds components must match. Thus, if the hours is negative, the minutes and seconds must be negative or zero.
- hours
the time-zone offset in hours, from -18 to +18
- minutes
the time-zone offset in minutes, from 0 to ±59, sign matches hours and seconds
- seconds
the time-zone offset in seconds, from 0 to ±59, sign matches hours and minutes
- returns
the zone-offset, not null
- Exceptions thrown
DateTimeException
if the offset is not in the required range
-
def
ofTotalSeconds(totalSeconds: Int): ZoneOffset
Obtains an instance of
ZoneOffset
specifying the total offset in secondsObtains an instance of
ZoneOffset
specifying the total offset in secondsThe offset must be in the range
-18:00
to+18:00
, which corresponds to -64800 to +64800.- totalSeconds
the total time-zone offset in seconds, from -64800 to +64800
- returns
the ZoneOffset, not null
- Exceptions thrown
DateTimeException
if the offset is not in the required range
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()