From: anieden@... (Axel Niedenhoff) Date: 2001-11-16T04:13:28+09:00 Subject: [ruby-talk:25304] Re: parsedate: NameError when calling sub! ts wrote in message news:<200111141242.fAECgfi08000@moulon.inra.fr>... > >>>>> "A" == Axel Niedenhoff writes: > > A> print '*' if Date.new(ParseDate.parsedate(File.stat(fileName).mtime, > A> true)[0, 2]) < threshold > > call Time#to_s > [...] > Guy Decoux Thank you, Guy! The crucial part is that File::Stat#mtime returns a Time object (a fact which escaped me somehow). Knowing this, I could shorten the above to print '*' if File.stat(fileName).mtime < threshold threshold has to be a Time object, too, of course. Kind regards, Axel <><