pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gnanakumar <gnanam@zoniac.com>
To: 'Samuel Gendler' <sgendler@ideasculptor.com>
Cc: 'Amitabh Kant' <amitabhkant@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Calculating relative time/distance from CURRENT_TIMESTAMP
Date: Fri, 5 Aug 2011 14:37:08 +0530
Message-ID: <009001cc534f$12625de0$372719a0$@com> (raw)
In-Reply-To: <CAEV0TzBu+vDhYp9R8Eeu1iCH2++VwABQcK+wVdSEExLgszZv5Q@mail.gmail.com>
References: <009301cc527b$c48690b0$4d93b210$@com>
	<CAPTAQBJ3YFkKVPm9LfQ=fRvmfBVuyAjT1nJ=mqodrsCv=+sOXA@mail.gmail.com>
	<001201cc529b$adc7c220$09574660$@com>
	<CAEV0TzBu+vDhYp9R8Eeu1iCH2++VwABQcK+wVdSEExLgszZv5Q@mail.gmail.com>

> 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.





view thread (6+ messages)

Message-ID: <009001cc534f$12625de0$372719a0$@com>
Permalink:  ../009001cc534f$12625de0$372719a0$@com/
Also on:    postgresql.org/message-id/009001cc534f$12625de0$372719a0$@com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gnanam@zoniac.com, sgendler@ideasculptor.com, amitabhkant@gmail.com
  Subject: Re: Calculating relative time/distance from CURRENT_TIMESTAMP
  In-Reply-To: <009001cc534f$12625de0$372719a0$@com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox