pike.git
/
lib
/
modules
/
Calendar.pmod
/
YMD.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Calendar.pmod/YMD.pike:3228:
//! "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);
+
what = String.trim(what);
if (sizeof(what)>22 && (t=http_time(what,cx))) return t; if (sizeof(what)>12 && (t=parse(SPACED("%e %M %D %h:%m:%s %Y"),what,cx))) return t; // ctime if (sizeof(what)>15 && (t=parse(SPACED("%e %M %D %h:%m:%s %z %Y"),what,cx))) return t; if (sizeof(what)>19 && (t=parse(SPACED("%e %M %D %h:%m:%s %z DST %Y"),what,cx))) return t;