From: ES Date: 2005-05-16T00:43:06+09:00 Subject: Re: Formatting date without leading zeros Le 15/5/2005, "David A. Black" a �crit: >Hi -- > >On Sun, 15 May 2005, ES wrote: > >> >> Le 15/5/2005, "nobu.nokada@softhome.net" a >> �crit: >>> Hi, >>> >>> At Sun, 15 May 2005 21:01:23 +0900, >>> David A. Black wrote in [ruby-talk:142696]: >>>>> irb(main):003:0> t.strftime('%b %-2d %Y %-2H:%-2M') >>>>> => "Jan 4 2005 9: 5" >>>> >>>> I hadn't thought to look there -- I'd tried something like: >>>> >>>> irb(main):002:0> Date.today.strftime('%b %-2d %Y %-2H:%-2M') >>>> >>>> which gave me: >>>> >>>> => "May %-2d 2005 %-2H:%-2M" >>> >>> It looks like system dependent. >> >> I think he was saying that Date will not do it while Time >> will (with Matz-ue providing an explanation for this). > >Yes, except for the part about Matz providing an explanation. Or did >I miss that? Actually, it was a separate thread, I did not even realize it. Essentially, Date is parsed with code by the Ruby team while Time is parsed with strftime from the underlying platform. See thread "Possible bug in Date/ParseDate" >David > >David A. Black E -- template void quack(duck& d) { d.quack(); }