M
Mark Volkmann
Why does the year get changed in this code?
require 'date'
s = '2998-12-31'
date = Date.parse(s)
f = date.strftime('%d-%b-%G')
puts f
The output is 31-Dec-2999.
This doesn't seem to happen with earlier years.
This happens with Ruby 1.8.6 and JRuby 1.2.0RC2.
require 'date'
s = '2998-12-31'
date = Date.parse(s)
f = date.strftime('%d-%b-%G')
puts f
The output is 31-Dec-2999.
This doesn't seem to happen with earlier years.
This happens with Ruby 1.8.6 and JRuby 1.2.0RC2.