Sha256: d253d67526cccec56d91f1b293b99e19916ed0a05a8275d97fc6627573e97f10

Contents?: true

Size: 1.32 KB

Versions: 2

Compression:

Stored size: 1.32 KB

Contents

# 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

```ruby
<%= 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 |

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
drexed-datetime-0.0.10 README.md
drexed-datetime-0.0.9 README.md