On Thu, 10 Jun 2004, Rick Measham wrote: > On 10 Jun 2004, at 9:25 AM, Dave Rolsky wrote: > > What is half a minute? How long is half a month? > > $dtd = DateTime::Duration->new( > months => 1, > minutes => 1, > ); > > $half_dtd = $dtd / 2; > > print $half_dtd->months . "\n"; > # 0.5 > > print $half_dtd->seconds . "\n"; > # 0.5 > > print strfduration( > normalise => 'ISO', > pattern => '%Y years, %m months, %e days, %H hours, %M minutes, %S > seconds', > duration => $half_dtd > ); > # 0 years, 0 months, 15 days, 0 hours, 0 minutes, 30 seconds
Great, now what should DateTime.pm do in the add_duration method? -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
