struct

PG::Interval

Inherits Struct / Value / Object

A representation for INTERVAL data type. https://www.postgresql.org/docs/current/datatype-datetime.html

Constructors

new(microseconds : Int64 = 0, days : Int32 = 0, months : Int32 = 0)
Source

Instance methods

days
Source
microseconds
Source
months
Source
to_month_span
Source
to_span(approx_months : Int | Nil = nil)

Create a Time::Span from this PG::Interval If the interval covered in the interval exceeds the range of Time::Span  then an exception is raised.

Source
to_spans
Source