Harold Hausman wrote:
> On 11/14/05, Jamis Buck wrote:
> > It should just be a matter of using strftime:
> >
> >    value.strftime("%a %b %e at %I:%M%p")
>
> Wow, that works like a charm, thanks.


Just ignore this, then :)


require 'date'

def time_fmt2(str)
  DateTime.parse(str).
           new_offset(-7/24.0).
           strftime('%a %b %d at %I:%M%p').
           sub(/[AP]M\z/) {|xm| xm.downcase}
end

p time_fmt2('2005/11/15 05:59')     # "Mon Nov 14 at 10:59pm"


daz