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-21' ? 'summer' : $date lt '12-21' ? 'autumn' : 'winter'; }Since seasons can sometimes change on the 22nd instead of the 21st, this isn't quite right. Anyone else done something like this but more accurate?
Where in the world do you want to calculate them?http://en.wikipedia.org/wiki/Season#Reckoning seems to have the information you need.
Cheers! Rick Measham
smime.p7s
Description: S/MIME Cryptographic Signature