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
- Host: GitHub
- URL: https://github.com/swordray/datetime_tag_helper
- Owner: swordray
- License: mit
- Created: 2014-03-18T05:06:30.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2022-01-26T03:12:22.000Z (over 4 years ago)
- Last Synced: 2025-01-08T04:32:21.025Z (over 1 year ago)
- Topics: actionview, rails, ruby
- Language: Ruby
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# datetime_tag_helper
[](http://badge.fury.io/rb/datetime_tag_helper) [](http://travis-ci.org/swordray/datetime_tag_helper) [](https://gemnasium.com/swordray/datetime_tag_helper) [](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).