Re: DateTime->season?

2008-01-28 Thread Daisuke Maki
David, for some reason I *knew* you would be trying SolarTerm... Of course apparently the test failed for you (which seem to pass on my laptop, by the way), but anyhow. I was actually going to reply to this thread, but then I realized that DT::Event::SolarTerm isn't really worth it because of

Re: DateTime->season?

2008-01-28 Thread Rick Measham
David E. Wheeler wrote: Hey All, Someone on the Bricolage list needed a season method, so I whipped up this ugly one: sub season { my $date = shift->strftime('%m-%d'); return $date lt '03-21' ? 'winter' : $date lt '06-21' ? 'spring' : $date lt '09

DateTime->season?

2008-01-28 Thread David E . Wheeler
Hey All, Someone on the Bricolage list needed a season method, so I whipped up this ugly one: sub season { my $date = shift->strftime('%m-%d'); return $date lt '03-21' ? 'winter' : $date lt '06-21' ? 'spring' : $date lt '09-21' ? 'summer'