robbyrussell / year_after_year

A (extremely) simple helper for Ruby on Ruby on Rails to output the current year... seriously folks... this is serious stuff. ;-)

Home Page:http://www.robbyonrails.com/articles/2008/03/24/dry-a-year-after-year

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YearAfterYear
==============

This plugin allows you to keep your copyright year up-to-date.

Example
=======

You can render the current year in your ERb views like so:

  <%= current_year -%>

If you want to provide a year range, you can use year_range and provide the
year that you started.

  Example: With the assumption that the current year was 2008

  <%= current_year_range(2005) -%>     				# => 2005-2008
  <%= current_year_range(2005, '&mdash;') -%> # => 2005&mdash;2008
  <%= current_year_range(2008) -%>     				# => 2008 (just returns current year)

You can access the code here:

* http://github.com/robbyrussell/year_after_year/

Feature Requests / Bugs

* http://planetargon.lighthouseapp.com/projects/5187-open-source-projects

Copyright (c) 2008 Robby Russell, released under the MIT license

About

A (extremely) simple helper for Ruby on Ruby on Rails to output the current year... seriously folks... this is serious stuff. ;-)

http://www.robbyonrails.com/articles/2008/03/24/dry-a-year-after-year

License:MIT License


Languages

Language:Ruby 100.0%