Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (11 sloc) 0.371 kB
require File.expand_path('../test_helper', __FILE__)
require 'date'
describe 'Date' do
it 'should format date (yyyymmdd)' do
Date.new(2010, 06, 14).strftime('%Y%m%d').must_equal '20100614'
end
it 'should format date and time (yyyymmddhhmmss)' do
DateTime.new(2010, 06, 14, 15, 16, 17)
.strftime('%Y%m%d%H%M%S').must_equal '20100614151617'
end
end
Jump to Line
Something went wrong with that request. Please try again.