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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Language.pmod:60:    return month_n2s[n];    }       string month_shortname_from_number(int n)    {    return month_n2ss[n];    }       int month_number_from_name(string name)    { -  int j=(month_s2n[flat(name)]); +  int j=(month_s2n[name]) +  || (month_s2n[flat(name)]);    if (!j) error("no such month of year: %O\n",name);    return j;    }       string week_day_name_from_number(int n)    {    return week_day_n2s[n];    }       string week_day_shortname_from_number(int n)    {    return week_day_n2ss[n];    }       int week_day_number_from_name(string name)    { -  int j=(week_day_s2n[flat(name)]); +  int j=(week_day_s2n[name]) +  || (week_day_s2n[flat(name)]);    if (!j) error("no such day of week: %O\n",name);    return j;    }       string week_name_from_number(int n)    {    return sprintf("w%d",n);    }       int week_number_from_name(string s)