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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/YMD.pmod:1758:    if (day>number_of_days())    if (!force)    return 0;    else    return Day("ymd_jd",rules,jd+day-1,max(0,day_n-1))->autopromote();    return Day("ymd_jd",rules,jd+day-1,day_n)->autopromote();    }       TimeRange place(TimeRange what,void|int force)    { +  if (what->is_supertimerange) +  return what->mend_overlap(map(what->parts,place,force)); + // return `|(@map(what->parts,place,force)); +     if (what->is_year)    return year()->place(what,force); // just fallback       if (what->is_day)    return place_day(what->week_day(),what->n,force);    -  +  if (what->is_timeofday) +  return place(what->day(),force)->place(what,force); +     error("place: Incompatible type %O\n",what);    }      // --- Week to other units       int number_of_years()    {    if (n<=1) return 1;       [int y2,int w2,int wd2,int nd2,int jd2]=week_from_week(y,w+n);