public
Description: A (extremely) simple helper for Ruby on Ruby on Rails to output the current year... seriously folks... this is serious stuff. ;-)
Homepage: http://www.robbyonrails.com/articles/2008/03/24/dry-a-year-after-year
Clone URL: git://github.com/robbyrussell/year_after_year.git
year_after_year / README
100644 31 lines (18 sloc) 0.812 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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