Permalink
Browse files

Adding example code for using year_range

  • Loading branch information...
1 parent 7607c13 commit ff2e8f679d1b102fcaf0b1996c9502244f21e96c @robbyrussell committed Mar 25, 2008
Showing with 8 additions and 0 deletions.
  1. +8 −0 README
View
@@ -9,6 +9,14 @@ 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)
You can access the code here:

0 comments on commit ff2e8f6

Please sign in to comment.