0.0
No commit activity in last 3 years
No release in over 3 years
Humanizes datetime for Active Record objects. Ported from Rails by Alexandra Wright, intended for use in the Sinatra microframework. Please require 'pretty' in your application
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

PrettyStamps¶ ↑

PrettyStamps makes Facebook-style datetime-contextual datetimes a cinch for your ActiveRecord objects. Originally developed for Rails by Brett Shollenberger. Ported for use in Sinatra by Alexandra Wright.

To use, please enter:

require ‘pretty’

in your application

Examples¶ ↑

Comment created just now:¶ ↑

just now

Comment created seconds or minutes ago¶ ↑

10 seconds ago
2 minutes ago

Comment created today¶ ↑

Today at 5:30PM

Comment created yesterday¶ ↑

Yesterday at 5:30PM

Comment created this week¶ ↑

Monday at 5:30PM

Comment created last week¶ ↑

Last Monday at 5:30PM

After that:¶ ↑

Monday, July 1 at 5:30PM

Use¶ ↑

gem "hublot", "~> 0.0.6"

Call the pretty method in your views:

<%= @comment.created_at.pretty %>