struct PG::Interval

Overview

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

Defined in:

pg/interval.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(microseconds : Int64 = 0, days : Int32 = 0, months : Int32 = 0) #

[View source]

Instance Method Detail

def days : Int32 #

[View source]
def microseconds : Int64 #

[View source]
def months : Int32 #

[View source]
def to_month_span #

[View source]
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.


[View source]
def to_spans #

[View source]