T
Taras Koval
Hi all,
I have a problem, I cannot convert string to Time.
I wrote function, but they don't work:
def string_to_time(string)
return string unless string.is_a?(String)
time_hash = Date._parse(string)
new_time = Time.mktime(time_hash[:year], time_hash[:mon],
time_hash[:mday])
return new_time
end
Please help!
I have a problem, I cannot convert string to Time.
I wrote function, but they don't work:
def string_to_time(string)
return string unless string.is_a?(String)
time_hash = Date._parse(string)
new_time = Time.mktime(time_hash[:year], time_hash[:mon],
time_hash[:mday])
return new_time
end
Please help!