Re: [Rails] Re: Rails 3 mysql date

2010-10-20 Thread Erol Fornoles
On Wed, Oct 20, 2010 at 11:21 PM, Todd Fisher wrote: > > ruby-1.9.2-p0 => Sun 10 January 2010 > ruby-1.8.7-p302 => Fri 01 October 2010 > > One solution for Ruby 1.9.2 would be to redefine Date.parse as: > > class Date > def self.parse(input) >Date.strptime(input, "%m/%d/%Y") > end > end >

[Rails] Re: Rails 3 mysql date

2010-10-20 Thread Todd Fisher
This has to do with how ruby 1.9.x changed the default Date.parse see this sample script: require 'time' require 'date' r = Date.parse("10/1/2010") puts r.strftime("%a %d %B %Y") ruby-1.9.2-p0 => Sun 10 January 2010 ruby-1.8.7-p302 => Fri 01 October 2010 One solution for Ruby 1.9.2 would

[Rails] Re: Rails 3 mysql date

2010-10-12 Thread Javix
You can try to personalize you jQuery datepicker as follows: [code] $("#project_formatted_start_date").datepicker({ altField: '#project_formatted_start_date',altFormat: 'yy-mm-dd'}); [/code] See jQuery API for datepicker for more details. On Oct 10, 9:43 pm, johne wrote: > I am running into the

[Rails] Re: Rails 3 mysql date

2010-10-11 Thread Erol Fornoles
Found a plugin which aims to address localization and delocalization, but may be useful for this problem: http://github.com/clemens/delocalize On Oct 12, 8:02 am, johne wrote: > It appears this is the issue. > > http://slightlycoded.com/blog/ruby-1-9-date-problems > > What is the preferred way t

[Rails] Re: Rails 3 mysql date

2010-10-11 Thread johne
It appears this is the issue. http://slightlycoded.com/blog/ruby-1-9-date-problems What is the preferred way to fix this in ruby 1.9 and rails? On Oct 10, 12:43 pm, johne wrote: > I am running into the same issue. I have confirmed it works properly > on rails 3 and ree 1.8.7, but not on rails 3

[Rails] Re: Rails 3 mysql date

2010-10-10 Thread johne
I am running into the same issue. I have confirmed it works properly on rails 3 and ree 1.8.7, but not on rails 3, ruby 1.9.2 (I am wanting US formatted date strings) [ruby-1.9.2] rails console Loading development environment (Rails 3.0.0) >> Offer.last.update_attributes(:publish_start => '31/10/

[Rails] Re: Rails 3 mysql date

2010-10-09 Thread Scott Griffin
Yannick Yanikos wrote: > Hello, > > I have a problem with date when saving into my sql with rails 3. > > Into my environment.rb file i put Date::DATE_FORMATS[:default] = > "%d/%m/%Y" > > i created a jquery calendar and into the text field the date is for > example 01/10/2010. > When i save, the

[Rails] Re: Rails 3 mysql date

2010-10-08 Thread Bob Smith
Marnen Laibow-Koser wrote: > Yannick Yanikos wrote: >> Hello, >> >> I have a problem with date when saving into my sql with rails 3. >> >> Into my environment.rb file i put Date::DATE_FORMATS[:default] = >> "%d/%m/%Y" >> >> i created a jquery calendar and into the text field the date is for >> e

[Rails] Re: Rails 3 mysql date

2010-10-08 Thread Marnen Laibow-Koser
Yannick Yanikos wrote: > Hello, > > I have a problem with date when saving into my sql with rails 3. > > Into my environment.rb file i put Date::DATE_FORMATS[:default] = > "%d/%m/%Y" > > i created a jquery calendar and into the text field the date is for > example 01/10/2010. Is this supposed t

[Rails] Re: Rails 3 mysql date

2010-10-08 Thread Bob Smith
Yannick Yanikos wrote: > Hello, > > I have a problem with date when saving into my sql with rails 3. > > Into my environment.rb file i put Date::DATE_FORMATS[:default] = > "%d/%m/%Y" > > i created a jquery calendar and into the text field the date is for > example 01/10/2010. > When i save, the