From: Lloyd Zusman Date: 2005-11-14T00:45:30+09:00 Subject: Re: Converting between Time and DateTime Daniel Schierbeck writes: > [ ... ] > > I think this would be more Rubyish: > > class DateTime > def to_time > Time.mktime(year, mon, day, hour, min, sec) > end > end > > class Time > def to_datetime > DateTime.civil(year, mon, day, hour, min, sec) > end > end > > I haven't tested it, but it should work. Thanks. Is this considered more ruby-ish because of the non-camel-case of the method names? ... or because of the to_* methods instead of the from* constructors? ... or both? -- Lloyd Zusman ljz@asfast.com God bless you.