struct
DuckDB::TimeOfDay
- DuckDB::TimeOfDay
- Struct
- Value
- Object
Overview
Represents the TIME data type of SQL within DuckDB.
Defined in:
duckdb/time_of_day.crConstructors
- .new(hour : Int32, minute : Int32, second : Int32 = 0, microsecond : Int32 = 0)
-
.new(time : Time)
NOTE It raises
ArgumentErroriftimeis not in UTC. -
.new(span : Time::Span)
NOTE It raises
ArgumentErrorunlessspanis less than one day. - .new(string : String)
-
.new(microseconds : Int64)
Initialize with microseconds since 00:00:00 NOTE: It raises
ArgumentErrorunlessmicrosecondsrepresent less than one day.
Instance Method Summary
- #==(other : self) : Bool
- #hour : Int32
- #microsecond : Int32
- #millisecond
- #minute : Int32
- #second : Int32
- #submillisecond?
- #subsecond?
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #to_span : Time::Span
Constructor Detail
NOTE It raises ArgumentError if time is not in UTC.
NOTE Beware the loss of precision in the fractional part (nanoseconds to microseconds)
NOTE It raises ArgumentError unless span is less than one day.
NOTE Beware of loss of precision for the fractional part (nanoseconds to microseconds).
Initialize with microseconds since 00:00:00
NOTE It raises ArgumentError unless microseconds represent less than one day.
Instance Method Detail
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.