Return to v1.4.5 docs

timeAgoInWords()



Pass in a date to this method, and it will return a string describing the approximate time difference between that date and the current date.

Name Type Required Default Description
fromTime date Yes Date to compare from..
includeSeconds boolean No false Whether or not to include the number of seconds in the returned string.
toTime date No [runtime expression] Date to compare to.
timeAgoInWords(fromTime [, includeSeconds, toTime ]) <cfset aWhileAgo = Now() - 30>
<cfoutput>#timeAgoInWords(aWhileAgo)#</cfoutput>