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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Gregorian.pmod:194:    {    if (objectp(n))    if (object_program(n)==vMonth)    n=n->number();       if (stringp(n))    {    if (!month_mapping)    {    month_mapping= -  mkmapping(Array.map(month_names,lower_case), -  indices(allocate(13))[1..]); +  mkmapping(Array.map(month_names, lower_case)+ +  Array.map(month_names, +  lambda(string s) +  { return lower_case(s[0..2]); } ), +  (indices(allocate(13))[1..]) * 2);    }    n=month_mapping[lower_case(n)];    if (!n) return 0;    }       if (n<0)    return vMonth(y,13+n);    else    return vMonth(y,n||1);    }
pike.git/lib/modules/Calendar.pmod/Gregorian.pmod:1450:    {    if (m->y<70) m->y+=2000;    else if (m->y<100) m->y+=1900;    m->year=Year(m->y);    }    else m->year=Year();       object low=m->year;       if (m->M) +  {    m->month=low=m->year->month(m->M); -  +  if(!m->month) +  return 0; // Unknown month +  }    if (m->W)    m->week=low=m->year->week(m->W);       if (m->D)    m->day=low=(m->month||Month())->day(m->D);    else if (m->a)    m->day=low=m->year->day(m->a);    else if (m->e)    m->day=low=(m->week||Week())->day(m->e);