Re: Calculating relative time/distance from CURRENT_TIMESTAMP

From: "Gnanakumar" <gnanam(at)zoniac(dot)com>
To: "'Samuel Gendler'" <sgendler(at)ideasculptor(dot)com>
Cc: "'Amitabh Kant'" <amitabhkant(at)gmail(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Calculating relative time/distance from CURRENT_TIMESTAMP
Date: 2011-08-05 09:07:08
Message-ID: 009001cc534f$12625de0$372719a0$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jasen Betts 2011-08-05 12:40:19 Re: Generic design: char vs varchar primary keys
Previous Message Samuel Gendler 2011-08-04 22:24:45 Re: Calculating relative time/distance from CURRENT_TIMESTAMP