i am sure i have used date.parse in my code. however it does not work
anymore. i also tried to change the string format but it did not help.
any assistance is appreciated.
irb(main):022:0> Date.parse("2006-01-02")
NoMethodError: undefined method `parse' for Date:Class
from (irb):22
irb(main):023:0> Date.parse("03/28/2008")
NoMethodError: undefined method `parse' for Date:Class
from (irb):23
irb(main):024:0> Date.parse("28/3/2008")
NoMethodError: undefined method `parse' for Date:Class
from (irb):24
irb(main):025:0> Date.strptime('28/03/2008', '%d/%m/%Y')
NoMethodError: undefined method `strptime' for Date:Class
from (irb):25
irb(main):026:0>
i am sure i have used date.parse in my code. however it does not work
anymore. i also tried to change the string format but it did not help.
any assistance is appreciated.
irb(main):022:0> Date.parse("2006-01-02")
NoMethodError: undefined method `parse' for Date:Class
from (irb):22
irb(main):023:0> Date.parse("03/28/2008")
NoMethodError: undefined method `parse' for Date:Class
from (irb):23
irb(main):024:0> Date.parse("28/3/2008")
NoMethodError: undefined method `parse' for Date:Class
from (irb):24
irb(main):025:0> Date.strptime('28/03/2008', '%d/%m/%Y')
NoMethodError: undefined method `strptime' for Date:Class
from (irb):25
irb(main):026:0>
Don't ask me way, but you must load "date.rb" library instead of "time.rb"
library.
Both contain "Date" class but just "date.rb" contains that method.
···
El Jueves, 14 de Agosto de 2008, Junkone escribió:
i am sure i have used date.parse in my code. however it does not work
anymore. i also tried to change the string format but it did not help.
any assistance is appreciated.
irb(main):022:0> Date.parse("2006-01-02")
NoMethodError: undefined method `parse' for Date:Class
from (irb):22
irb(main):023:0> Date.parse("03/28/2008")
NoMethodError: undefined method `parse' for Date:Class
from (irb):23
irb(main):024:0> Date.parse("28/3/2008")
NoMethodError: undefined method `parse' for Date:Class
from (irb):24
irb(main):025:0> Date.strptime('28/03/2008', '%d/%m/%Y')
NoMethodError: undefined method `strptime' for Date:Class
from (irb):25
irb(main):026:0>