struct PG::Interval
- PG::Interval
- Struct
- Value
- Object
Overview
A representation for INTERVAL data type. https://www.postgresql.org/docs/current/datatype-datetime.html
Defined in:
pg/interval.crConstructors
Instance Method Summary
- #days : Int32
- #microseconds : Int64
- #months : Int32
- #to_month_span
-
#to_span(approx_months : Int | Nil = nil)
Create a
Time::Span
from thisPG::Interval
If the interval covered in the interval exceeds the range ofTime::Span
then an exception is raised. - #to_spans
Constructor Detail
Instance Method Detail
def 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.