Skip to content

Commit

Permalink
Now using stamp for time and dates.
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksrobertson committed Aug 25, 2011
1 parent 1f50e0c commit c41063a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ gem 'sass-rails', :git => 'https://github.com/rails/sass-rails.git', :ref
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31'
gem 'simple_form', '~> 1.4.0'
gem 'friendly_id', '~> 3.3.0.rc2'
gem 'stamp', '~> 0.1' # Jeremy can be apprehended if he breaks semantic versioning rules.

# RSpec needs to be in :development group to expose generators
# and rake tasks without having to type RAILS_ENV=test.
Expand Down
32 changes: 17 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
GIT
remote: https://github.com/chriseppstein/compass.git
revision: 91a748a916360057b5caf6ea85cd38441d3b257a
revision: f23bf58e8db84e17e6fab37cc73e5a539924cca0
branch: rails31
specs:
compass (0.12.0.alpha.0.91a748a)
compass (0.12.0.alpha.0.f23bf58)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
Expand Down Expand Up @@ -67,16 +67,16 @@ GEM
bourne (1.0)
mocha (= 0.9.8)
builder (3.0.0)
capybara (1.0.0)
capybara (1.0.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 0.2.0)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.2.0)
childprocess (0.2.1)
ffi (~> 1.0.6)
chunky_png (1.2.0)
chunky_png (1.2.1)
columnize (0.3.4)
crack (0.1.8)
database_cleaner (0.6.7)
Expand All @@ -96,12 +96,12 @@ GEM
babosa (~> 0.3.0)
fssm (0.2.7)
high_voltage (0.9.4)
hike (1.2.0)
hike (1.2.1)
hoptoad_notifier (2.4.11)
activesupport
builder
i18n (0.6.0)
jquery-rails (1.0.12)
jquery-rails (1.0.13)
railties (~> 3.0)
thor (~> 0.14)
json_pure (1.5.3)
Expand Down Expand Up @@ -149,7 +149,7 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.8.7)
rdoc (3.9.1)
rdoc (3.9.3)
redis (2.2.2)
rspec (2.6.0)
rspec-core (~> 2.6.0)
Expand All @@ -176,21 +176,22 @@ GEM
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.4)
sass (3.1.7)
selenium-webdriver (0.2.2)
childprocess (>= 0.1.9)
selenium-webdriver (2.5.0)
childprocess (>= 0.2.1)
ffi (>= 1.0.7)
json_pure
rubyzip
simple-rss (1.2.3)
simple_form (1.4.2)
actionpack (~> 3.0)
activemodel (~> 3.0)
sprockets (2.0.0.beta.13)
sprockets (2.0.0.beta.14)
hike (~> 1.2)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.4)
therubyracer (0.9.2)
stamp (0.1.6)
therubyracer (0.9.4)
libv8 (~> 3.3.10)
thor (0.14.6)
tilt (1.3.2)
Expand All @@ -199,7 +200,7 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.29)
uglifier (1.0.0)
uglifier (1.0.1)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
valid_attribute (1.1.0)
Expand Down Expand Up @@ -238,6 +239,7 @@ DEPENDENCIES
simple-rss (~> 1.2.3)
simple_form (~> 1.4.0)
sqlite3
stamp (~> 0.1)
therubyracer
timecop (~> 0.3.5)
uglifier
Expand Down
10 changes: 5 additions & 5 deletions config/initializers/time_formats.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
:short_date => "%x", # 04/13/10
:long_date => "%a, %b %d, %Y", # Tue, Apr 13, 2010
:month_and_year => "%B %Y", # April 2011
:date => '%B %e, %Y' # April 22, 2011
:short_date => "04/13/10", # %x
:long_date => "Tue, Apr 13, 2010", # %a, %b %d, %Y
:month_and_year => "April 2011", # %B %Y
:date => "April 22, 2011" # %B %e, %Y
}.each do |format_name, format_string|
Time::DATE_FORMATS[format_name] = format_string
Time::DATE_FORMATS[format_name] = Stamp.strftime_format(format_string)
end

0 comments on commit c41063a

Please sign in to comment.