Nobuyoshi Nakada
1/15/2008 3:08:00 AM
Hi,
At Tue, 15 Jan 2008 11:56:04 +0900,
Ak 756 wrote in [ruby-talk:287454]:
> The result is what I expected but I think the modifytime is ugly.
> Can I use 'eval' so that I don't need to judge "+" or "-"?
> Or, any elegant solutions?
"+5".to_i == 5
"-50".to_i == -50
(Time.parse("00:11:20")+"+5".to_i).strftime("%T") # => "00:11:25"
--
Nobu Nakada