A robust time implementation with Hour, Minutes, Seconds of a day. Seconds are in precision up to attoseconds.
Attributes
- See also
-
TimeFormat
Date
- Note
-
This class is immutable and thread-safe
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Constructors
Build a time object from clock elements.
Build a time object from clock elements.
Value parameters
- hour
-
the hour of the day
- minute
-
the minute of the hour
- seconds
-
the second of the minute
- utcOffset
-
the offset from utc represented in minutes, in +ve or -ve
Attributes
- Throws
-
IllegalArgumentException
when invalid time components are provided, example: 24 hours
Build a time object from clock elements.
Build a time object from clock elements.
Value parameters
- hour
-
the hour of the day
- minute
-
the minute of the hour
- seconds
-
the second of the minute
- utcOffset
-
the offset from utc represented in minutes, in +ve or -ve
Attributes
- Throws
-
IllegalArgumentException
when invalid time components are provided, example: 24 hours
Build a time object from clock elements.
Build a time object from clock elements.
Value parameters
- hour
-
the hour of the day
- minute
-
the minute of the hour
- seconds
-
the second of the minute
Attributes
- Throws
-
IllegalArgumentException
when invalid time components are provided, example: 24 hours
Build a time object from clock elements.
Build a time object from clock elements.
Value parameters
- hour
-
the hour of the day
- minute
-
the minute of the hour
- seconds
-
the second of the minute
Attributes
- Throws
-
IllegalArgumentException
when invalid time components are provided, example: 24 hours
Build a time object from an Instant
.
Build a time object from an Instant
.
Value parameters
- instant
-
the
Instant
to convert to aTime
object
Attributes
- Throws
-
IllegalArgumentException
if the conversion fails This constructor assumes the UTC time zone and extracts the hour, minute, and second components from the provided
Instant
. The UTC offset is set to 0.
Build a time object from seconds in a day.
Build a time object from seconds in a day.
Value parameters
- seconds
-
the seconds parsed in TimeFormat
Attributes
- Throws
-
IllegalArgumentException
when TimeFormat cannot parse the seconds
- See also
-
TimeFormat
#Time(Double)
Build a Time object from seconds of a local day.
Build a Time object from seconds of a local day.
Value parameters
- seconds
-
the seconds in double
Attributes
- Throws
-
IllegalArgumentException
when TimeFormat cannot parse the seconds
- See also
-
TimeFormat#fromDouble
Concrete methods
Compare with another Time Object
Compare with another Time Object
Attributes
- Definition Classes
-
Comparable
Check equality
Check equality
Attributes
- Definition Classes
-
Any
Get the hour of the day
Get the hour of the day
Attributes
Get the minute of the hour
Get the minute of the hour
Attributes
Get the seconds of the minute
Get the seconds of the minute
Attributes
Get the seconds of the minute as time format
Get the seconds of the minute as time format
Attributes
Get the seconds of the day
Get the seconds of the day
Attributes
Returns the seconds in a day as TimeFormat
Returns the seconds in a day as TimeFormat
Attributes
Get the seconds of the day but adjusted with utc offset
Get the seconds of the day but adjusted with utc offset
Attributes
Get the current UTC offset in ISO8601 standard
Get the current UTC offset in ISO8601 standard
Attributes
Get the utc offset in minutes
Get the utc offset in minutes
Attributes
Hashcode
Hashcode
Attributes
- Definition Classes
-
Any
Get the current time formatted in IS08601; no UTC offset is added
Get the current time formatted in IS08601; no UTC offset is added
Attributes
Get the current time formatted in IS08601 UTC
Get the current time formatted in IS08601 UTC
Attributes
- Definition Classes
-
Any