On Thu, Feb 07, 2002 at 12:48:06PM +0100, Bart Lateur wrote: > On Thu, 7 Feb 2002 00:28:26 -0500, Michael G Schwern wrote: > > 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"; > > No it won't. You're displaying the year after the first year when > Christmas falls on a sunday. Preincrement, ++$year, would work, but > then you'd skip this year as a candidate.
Preincrement would include this year if you changed 1900 to 1899. :-) David Henderson -- For news about Trek books and Enterprise, visit Psi Phi! Star Trek Books: http://www.psiphi.org/cgi/upc-db/ Enterprise Site: http://enterprise.psiphi.org/ <*>