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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/YMD.pike:3196:    }    if (sscanf(day,"next %s",day))    {    cDay d=dwim_day(day);    return (d->week()+1)->place(d);    }       error("Failed to dwim day from %O\n",day);   }    + //! method Day dwim_time(string date_time) + //! method Day dwim_time(string date_time, TimeRange context) + //! Tries a number of different formats on the given date_time. + //! + //! note: + //! Casts exception if it fails to dwim out a time. + //! "dwim" means do-what-i-mean. +    TimeofDay dwim_time(string what,void|TimeRange cx)   {    TimeofDay t;      // #define COLON "$*[ :]"   #define COLON ":"   #define SPACED(X) replace(X," ","%*[ ]")       what = String.trim_all_whites(what);