Re: Calculating relative time/distance from CURRENT_TIMESTAMP - Mailing list pgsql-sql

From Gnanakumar
Subject Re: Calculating relative time/distance from CURRENT_TIMESTAMP
Date
Msg-id 009001cc534f$12625de0$372719a0$@com
Whole thread Raw
In response to Re: Calculating relative time/distance from CURRENT_TIMESTAMP  (Samuel Gendler <sgendler@ideasculptor.com>)
List pgsql-sql
> If you really want a flexible function for doing this, I suspect you could
replicate the functionality of jquery's 'timeago' module in a stored proc
relatively easily. http://timeago.yarp.com/ It is MIT licensed, so you can
copy the logic without restriction.  It makes reference to being derivative
of a ruby project, so you could probably grab that code and convert it to
ruby-pg very easily.
 
Thanks for that useful link.  I believe in my case this will work out.
Thanks again.




pgsql-sql by date:

Previous
From: Samuel Gendler
Date:
Subject: Re: Calculating relative time/distance from CURRENT_TIMESTAMP
Next
From: Jasen Betts
Date:
Subject: Re: Generic design: char vs varchar primary keys