struct

DuckDB::TimeOfDay

Inherits Struct / Value / Object

Represents the TIME data type of SQL within DuckDB.

Constructors

new(hour : Int32, minute : Int32, second : Int32 = 0, microsecond : Int32 = 0)
Source
new(time : Time)

NOTE: It raises ArgumentError if time is not in UTC. NOTE: Beware the loss of precision in the fractional part (nanoseconds to microseconds)

Source
new(span : Time::Span)

NOTE: It raises ArgumentError unless span is less than one day. NOTE: Beware of loss of precision for the fractional part (nanoseconds to microseconds).

Source
new(string : String)
Source
new(microseconds : Int64)

Initialize with microseconds since 00:00:00 NOTE: It raises ArgumentError unless microseconds represent less than one day.

Source

Instance methods

==(other : self) : Bool
Source
hour
Source
microsecond
Source
millisecond
Source
minute
Source
second
Source
submillisecond?
Source
subsecond?
Source
to_s

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.

Source
to_span
Source