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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/YMD.pike:841:       array(TimeRange) res=years(m,m);    if (sizeof(res)==1) return res[0];    error("Not in range (Year 1..%d exist)\n",    number_of_years());    }         // days    + //! method int number_of_days() + //! Get the number of days in the current range. +     int number_of_days();    -  + //! method array(Day) days(int|void from, int|void to) + //! Get the days in the current range. +     array(cDay) days(void|int from, void|int to)    {    int n=number_of_days();       if (undefinedp (from)) {    from = 1;    to = n;    }    else    if (undefinedp (to))
pike.git/lib/modules/Calendar.pmod/YMD.pike:889:    zjd+=rd;    to-=rd;    }       [zy,zyjd]=year_from_julian_day(zjd);    zyd=zjd-zyjd+1;    }    return res;    }    + //! method Day day() + //! method Day day(int n) + //! Get day number n in the current range. + //! + //! If n is negative, it is counted from the end of the range. +     cDay day(void|int m, mixed... ignored)    {    if (undefinedp (m)) m=1;       if (!n)    return Day("ymd_yd",rules,y,yjd,jd,yd,1);       if (m<0) m+=1+number_of_days();       array(TimeRange) res=days(m,m);