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
>
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
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
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
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
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/
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
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
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
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
10 matches
Mail list logo