Skip to content

Commit

Permalink
2 digit month and day
Browse files Browse the repository at this point in the history
  • Loading branch information
UnderpantsGnome committed Jan 6, 2011
1 parent f5684b1 commit 417a0c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config/initializers/time_formats.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Time::DATE_FORMATS[:url_part] = lambda { |time|
month = time.strftime('%m').gsub(/^0/, '')
time.strftime("%Y/#{month}/%e").gsub(/\s+/, '')
time.strftime("%Y/%m/%d")
}

0 comments on commit 417a0c5

Please sign in to comment.