Hi --

On Wed, 12 Nov 2008, Ken Bloom wrote:

> On Wed, 12 Nov 2008 21:42:10 +0900, David A. Black wrote:
>
>> Hi --
>>
>> I'm noticing this change, and wondering about it:
>>
>> irb(main):001:0> RUBY_VERSION
>> => "1.8.6"
>> irb(main):002:0> require 'date'
>> => true
>> irb(main):003:0> puts Date.parse("1/2/3").mon 1
>>
>> irb(main):001:0> RUBY_DESCRIPTION
>> => "ruby 1.9.0 (2008-11-12 revision 20227) [i386-darwin9.5.0]"
>> irb(main):002:0> require 'date'
>> => true
>> irb(main):003:0> puts Date.parse("1/2/3").mon 2
>>
>> Am I neglecting to set something I should be setting to get US behavior
>> in 1.9?
>>
>>
>> David
>
> You're not looking at the whole behavior of Ruby 1.9
> irb(main):005:0> Date.parse("1/2/3").year
> => 2001
>
> Whereas in Ruby 1.8
> irb(main):002:0> Date.parse("1/2/3").year
> => 3
>
> So there's a whole bunch of different behavior changes here, among them
> ruby1.9 has switched from American middle-endian dates to big-endian
> dates (not European little-endian dates as you're suggesting).
> Additionally, it's added century expansion.

Thanks for connecting the dots -- I'd been rather mindlessly looking
at those things in isolation.


David

-- 
Rails training from David A. Black and Ruby Power and Light:
   Intro to Ruby on Rails  January 12-15   Fort Lauderdale, FL
   Advancing with Rails    January 19-22   Fort Lauderdale, FL *
   * Co-taught with Patrick Ewing!
See http://www.rubypal.com for details and updates!