From: John Joyce Date: 2007-07-02T00:34:34+09:00 Subject: Re: Time.to_s Try Time#strftime (string format time) It is similar to the formatting found in other languages. You can define your own method and simply use part of this internally in you method: def my_time_format(Time) Time.strftim(%D%M) ...other code... end It is really that simple. On Jul 1, 2007, at 5:40 AM, Florian A�mann wrote: > Hi Jonas, > > the Object.to_s method should not expect an argument since it is per > default an alias for Object.name. > > If you want a custom time format you should overwrite the instance > method. There are several ways to accomplish this. For example you > derive from Time: > > class CustomTime < Time > def to_s > strftime 'Simon says: Do your %d sit-ups on every %A.' > end > end > > HF > Florian > >