An open API service indexing awesome lists of open source software.

https://github.com/swordray/datetime_tag_helper

ActionView Datetime Tag Helper
https://github.com/swordray/datetime_tag_helper

actionview rails ruby

Last synced: 28 days ago
JSON representation

ActionView Datetime Tag Helper

Awesome Lists containing this project

README

          

# datetime_tag_helper

[![Gem Version](https://badge.fury.io/rb/datetime_tag_helper.png)](http://badge.fury.io/rb/datetime_tag_helper) [![Build Status](https://secure.travis-ci.org/swordray/datetime_tag_helper.png?branch=master)](http://travis-ci.org/swordray/datetime_tag_helper) [![Dependency Status](https://gemnasium.com/swordray/datetime_tag_helper.png?travis)](https://gemnasium.com/swordray/datetime_tag_helper) [![Code Climate](https://codeclimate.com/github/swordray/datetime_tag_helper.png)](https://codeclimate.com/github/swordray/datetime_tag_helper)

ActionView Datetime Tag Helper

## Requirements

* Ruby ~> 2.0
* Rails

## Installation

Include the gem in your Gemfile:

```ruby
gem 'datetime_tag_helper'
```

## Usage

```ruby
datetime_tag(time)
```

## Examples

```ruby
= datetime_tag Time.now
# => less than a minute
```
```ruby
= datetime_tag 5.hours.ago
# => about 5 hours
```
```ruby
= datetime_tag 3.days.from_now
# => 3 days
```

## Sponsors

* [BaiLu ShuYuan](https://bailushuyuan.org)

## License

Copyright © 2014 Jianqiu Xiao under The [MIT License](http://opensource.org/licenses/MIT).