Relative time in Coldfusion
1/04/12

Here's a quick Coldfusion function to turn a date stamp into a relative time stamp (like Facebook has their dates showing as "2 seconds ago", for example). I use this at work, but I use its PHP equivalent on my log here.

http://pastebot.net/paste/PgyTNPDPx5x/

Usage:
<cfoutput>#RelativeTime('2012-01-04 16:09')#</cfoutput>
Tags: code, local, me


Entry ID: 000499