Hill, Ronald wrote:
> 
> > sub jan1{
> >  my $y =  shift;
> >  my $m = 1; $d = 1;
>               ^^^^^^
> why is that there? and I don't understand why you set $m to 1
> and then set it to 11?
> 
> >  $m = 11; $y--;
> >  my $c = int($y / 100); $yy = $y %100;
> >  my $z = ( 1 + $yy + int($yy/4) + int($c/4) - 2*$c) % 7;
> >  $z += 7 if $z < 0;
> >  return $z;   # 0 ==> Sun day.  6 ==> Sat. day.
> >}

More info here:

  http://www.merlyn.demon.co.uk/zeller-c.htm

  http://www.cpan.org/scripts/date_and_time/zeller.date.pl

- Flavio S. Glock

Reply via email to