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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/YMD.pmod:2421:    if (!zero_type(m->D))    if (stringp(m->D)) return 0;    else m->day=low=(m->month||cal->Month())->day(m->D);    else if (!zero_type(m->a))    m->day=low=m->year->day(m->a);    else if (!zero_type(m->e))    m->day=low=(m->week||cal->Week())->day(m->e);    else    low=m->day=cal->Day();    -  if (m->day && zero_type(m->Y) && m->e) +  if (m->day && zero_type(m->Y) && zero_type(m->y) && m->e)    if (m->month)    {    // scan for closest year that matches    cYear y2=m->day->year();    object d2;    int i;    for (i=0; i<20; i++)    {    d2=(y2+i)->place(m->day);    if (d2 && d2->week()->day(m->e)==d2) break;
pike.git/lib/modules/Calendar.pmod/YMD.pmod:2565:   Calendar.dwim_day("monday" );   Calendar.dwim_day("1");   Calendar.dwim_day("today");   Calendar.dwim_day("last monday");   Calendar.dwim_day("next monday");      */      array dwim_day_strings=   ({"%y-%M-%D (%*s) -W%W-%e (%e)", +  "%e%*[, ]%M%*[ ,]%D%*[ ,]%y",    "%D%*[ /]%M%*[- /,]%y",    "%M %D%*[- /,]%y",    "%e%*[, ]%D%*[a-z:]%*[ /]%M%*[-/ ,]%y",    "%y-%M-%D",    "-%y%*[ /]%D%*[ /]%M",    "-%y%*[ /]%M%*[ /]%D",    "%y%*[ /]%D%*[ /]%M",    "%y%*[ /]%M%*[ /]%D",    "%D%*[- /]%M",    "%M%*[- /]%D",
pike.git/lib/modules/Calendar.pmod/YMD.pmod:2626:    TimeofDay t;       foreach ( ({ " %z","%z",""}),    string zone )    foreach ( ({ "%t",    "T%t",    "%h:%*[ :]%m%*[ :]%s %p",    "%h:%*[ :]%m%*[ :]%s",    "%h:%*[ :]%m %p",    "%h:%*[ :]%m", +  "%h%*[ ]%p",    "%[a-zA-Z.] %h:%*[ :]%m%*[ :]%s %p",    "%[a-zA-Z.] %h:%*[ :]%m%*[ :]%s",    "%[a-zA-Z.] %h:%*[ :]%m %p", -  "%[a-zA-Z.] %h:%*[ :]%m", }), +  "%[a-zA-Z.] %h:%*[ :]%m", +  "%[a-zA-Z.] %h%*[ ]%p", }),    string todformat )    foreach ( dwim_day_strings +    ({""}),    string dayformat )    {    if ( (t=parse(dayformat+"%*[ ,]"+todformat+zone,what)) ) return t;    if ( (t=parse(todformat+zone+"%*[ ,]"+dayformat,what)) ) return t;    }       error("Failed to dwim time from %O\n",what);