Year after Year plugin

Plugin details

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

Websitehttp://www.robbyonrails.com/articles/2008/03/24/dry-a-year-after-year Repositorygit://github.com/robbyrussell/year_after_year.git Author Tim Riley Tags year LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install git://github.com/robbyrussell/year_after_year.git

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

  <%= year_range(2005) -%>     # => 2005-2008
  <%= year_range(2008) -%>     # => 2008 (just returns current year)


Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: Guest, 2 months ago