Branch: Tag:

2003-10-01

2003-10-01 15:26:32 by Dan Nelson <dnelson@emsphone.com>

Applied patch that adds %S format to Calendar.parse() for seconds since the Epoch. Thanks to dnelson@emsphone.com. Closes [bug 3516 (#3516)].

Rev: lib/modules/Calendar.pmod/YMD.pmod:1.50

2447:   //! %h hour (needs %d, %D or %W)   //! %m minute (needs %h)   //! %s second (needs %m) - //! %f fraction of a second (needs %s) + //! %S seconds since the Epoch (only combines with %f) + //! %f fraction of a second (needs %s or %S)   //! %t short time (205314, 2053)   //! %z zone   //! %p "am" or "pm"
2577:   #define ZONE "%[-+0-9A-Za-z/]"    nfmt=replace(fmt,    ({"%Y","%y","%M","%W","%D","%a","%e","%h","%m","%s","%p", -  "%t","%f","%d","%z","%n"}), +  "%t","%f","%d","%z","%n","%S"}),    ({ALNU,ALNU,ALNU,"%d",NUME,"%d",ALNU,"%d","%d","%d",AMPM, -  NUME,NUME,NUME,ZONE,"%s"})); +  NUME,NUME,NUME,ZONE,"%s","%d"}));      #if 1    q=array_sscanf(fmt,"%{%*[^%]%%%1s%}")*({})*({})-({"*","%"});
2757:    low = dwim_zone(low,m->z,g,h,mi,s);    else if (g)    low = dwim_tod(low,g,h,mi,s); +  else if (!zero_type(m->S)) +  low = Second(m->S);    if (sub_second)    low = low->fraction(sub_second);    return low;