From: Conrad Schneiker Date: 2000-12-22T05:44:34+09:00 Subject: [ruby-talk:7911] Re: Code sample for improvement GOTO Kentaro wrote: > Can I send joke? :-) > > zsh> ruby -e '#!/usr/bin/env ruby > > require "date" > > ("%d years %d months %d days %s\n" % > [ARGV[0].to_i.divmod 86400].map{|days,secs| > [Date.new0(days+5373485), Time.at(secs).gmtime] > }.map{|d,t| > [d.year-10000, d.month-1, d.mday-1, > "%d hours %d mins %d secs" % t.to_a.indices(2,1,0)] > }.shift).display > > ' 0123456789012346789 > 3912189903 years 10 months 26 days 5 hours 39 mins 49 secs > zsh> Pretty clever joke. How about centuries and millenia (since we only have a few days left tell the next one). Conrad Schneiker (This note is unofficial and subject to improvement without notice.)