On Thu, Feb 07, 2002 at 12:28:26AM -0500, Michael G Schwern wrote:
> On Thu, Feb 07, 2002 at 12:19:01AM -0500, Bill -OSX- Jones wrote:
> > Hi :)
> > 
> > I was asked recently if I could write a Perl program that
> > would find out when the next time Christmas day would
> > actually be on a Sunday.
> 
>     use Date::Christmas qw(christmasday);
>     my $year = (localtime)[5] + 1900;
>     1 until christmasday($year++) eq 'Sunday';
>     print "Christmas will fall on a Sunday in $year\n";
> 
> The man page has the algorithm.

Interestingly enough, it only uses straight math.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
the chair. it wants to die. oh no! she sees me! she attacks!

Reply via email to