avram icon indicating copy to clipboard operation
avram copied to clipboard

Add `Time::Span` for `interval` column

Open jwoertink opened this issue 3 years ago • 2 comments

in postgres, you can do this

# select interval '1 hour';
 interval 
----------
 01:00:00
(1 row)

and in Crystal 1.hour gives you 01:00:00.

jwoertink avatar May 10 '22 21:05 jwoertink

Got a little too excited, and forgot that 1.month and 1.year return Time::MonthSpan, but postgres 1 month and 1 year are still interval columns... So that would probably be hard to implement :thinking:

jwoertink avatar May 10 '22 21:05 jwoertink

Related: https://github.com/will/crystal-pg/issues/272

jwoertink avatar Sep 22 '23 18:09 jwoertink