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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/ISO.pmod:1:   // IS-8601, international standard    - inherit Calendar.Gregorian; + inherit Calendar.Gregorian:Gregorian;      class Year   { -  inherit Calendar.Gregorian.Year; +  inherit Gregorian::Year;       int leap_day()    {    if (y>1999) return 31+29-1; // 29 Feb    return 31+24-1; // 24 Feb    }   }      class Week   { -  inherit Calendar.Gregorian.Week; +  inherit Gregorian::Week;       int yday()    {    return    ({0,-1,-2,-3,3,2,1})[this->year()->julian_day(0)%7]    +7*(w-1);    }       array(mixed) days()    {
pike.git/lib/modules/Calendar.pmod/ISO.pmod:49:    n+=this->yday()-1;    if (n<0) return vYear(y-1)->day(n);    if (n>=this->year()->number_of_days())    return vYear(y+1)->day(n-this->year()->number_of_days());    return vDay(y,n);    }   }      class Day   { -  inherit Calendar.Gregorian.Day; +  inherit Gregorian::Day;       int week_day()    {    return julian_day()%7+1;    }       string week_day_name()    {    return week_day_names[(this->week_day()+6)%7];    }