Drexed-DateTime

Helpers for human readable datetime attributes.

Installation

Add this line to your application's Gemfile:

gem 'drexed-datetime'

And then execute:

$ bundle

Or install it yourself as:

$ gem install drexed-datetime

Datetime helpers

<%= date_for(@variable.created_at) %>
Helper strftime equivalent
year_for 2013
month_name_for December
abbr_month_name_for Dec
day_number_for 5
day_name_for Friday
abbr_day_name_for Fri
twelve_hour_time_for 07:13 PM
twelve_hour_time_with_timezone_for 07:13 PM EST
twenty_four_hour_time_for 19:12
twenty_four_hour_time_with_timezone_for 19:12 EST
month_day_and_time_for December 4 at 07:11 PM
abbr_month_day_and_time_for Dec 4 at 07:11 PM
month_day_and_time_with_timezone_for December 4 at 07:11 PM EST
abbr_month_day_and_time_with_timezone_for Dec 4 at 07:11 PM EST
datetime_for December 4, 2013 at 07:11 PM
abbr_datetime_for Dec 4, 2013 at 07:17 PM
datetime_with_timezone_for December 4, 2013 at 07:11 PM EST
abbr_datetime_with_timezone_for Dec 4, 2013 at 07:17 PM EST
date_for December 4, 2013
abbr_date_for Dec 4, 2013
month_and_day_for December 4
abbr_month_and_day_for Dec 4
timezone_name_for EST