pike.git / lib / modules / Calendar.pmod / Gregorian.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Gregorian.pmod:857:    array a=year()->month_start_day;    for (int i=2; i<sizeof(a); i++)    if (d<a[i]) return vMonth(y,i-1);    return vMonth(y,12);    }       object week()    {    int n;    object ye=this->year(); -  n=(-({-1,-2,-3,3,2,1,0})[this->year()->julian_day(0)%7]+d)/7+1; +  n=(-({-1,-2,-3,-4,2,1,0})[this->year()->julian_day(0)%7]+d)/7+1;    if (n>ye->number_of_weeks())    return ye->next()->week(1);    else if (n<=0)    return ye->prev()->week(-1);    return vWeek(y,n);    }   };