1 Reply Latest reply on May 17, 2013 12:01 AM by Lars Aurbakken

    ERROR: undefined method 'year'

      This code:

      require 'time'

      start_date = Date.new(2013,5,13).iso8601()

       

      Produces this error stack trace:

      App error: undefined method `year' for #<Date:0x5c9da74>

      C:/MotorolaRhoMobileSuite2.2.1.13/ruby/lib/ruby/gems/1.9.1/gems/rhodes-3.5.1.13/lib/framework/date/format.rb:248:in `block in strftime'

      C:/MotorolaRhoMobileSuite2.2.1.13/ruby/lib/ruby/gems/1.9.1/gems/rhodes-3.5.1.13/lib/framework/date/format.rb:217:in `gsub'

      C:/MotorolaRhoMobileSuite2.2.1.13/ruby/lib/ruby/gems/1.9.1/gems/rhodes-3.5.1.13/lib/framework/date/format.rb:217:in `strftime'

      C:/MotorolaRhoMobileSuite2.2.1.13/ruby/lib/ruby/gems/1.9.1/gems/rhodes-3.5.1.13/lib/framework/date/format.rb:348:in `iso8601'

       

       

      As can be seen, I'm using RhoMobile 2.2

       

      Any good explanation for this?