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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/YMD.pike:2807:      protected mapping abbr2zones;      // dwim timezone and call dwim time of day above   // this API may change without further notice   protected TimeRange dwim_zone(TimeRange origin,string zonename,    string whut,int ...args)   {    if (zonename=="") return 0;    -  Calendar.Rule.Timezone zone = Calendar.Timezone[zonename]; -  -  if( !zone ) -  { +     if (zonename[0]=='"') sscanf(zonename,"\"%s\"",zonename);    sscanf(zonename,"%*[ \t]%s",zonename);       if(sizeof(zonename)==4 && zonename[2]=='S')    zonename = zonename[0..1] + zonename[3..3];    else if(sizeof(zonename)>4 && has_suffix(zonename, "DST"))    zonename = zonename[..<3];       if (origin->rules->abbr2zone[zonename])    zonename=origin->rules->abbr2zone[zonename];    -  zone=Calendar.Timezone[zonename]; +  Calendar.Rule.Timezone zone = Calendar.Timezone[zonename];       if (!zone)    {    if (sscanf(zonename,"%[^+-]%s",string a,string b)==2 && a!="" && b!="")    {    TimeRange tr=dwim_zone(origin,a,whut,@args);    if (!tr) return 0;       return    dwim_tod(origin->set_timezone(
pike.git/lib/modules/Calendar.pmod/YMD.pike:2849:    abbr2zones = master()->resolv("Calendar")["TZnames"]["abbr2zones"];    array pz=abbr2zones[zonename];    if (!pz) return 0;    foreach (pz,string zn)    {    TimeRange try=dwim_zone(origin,zn,whut,@args);    if (try && try->tzname()==zonename) return try;    }    return 0;    } -  } +     return dwim_tod(origin->set_timezone(zone),whut,@args);   }      protected mapping(string:array) parse_format_cache=([]);      protected mapping dwim_year=([ "past_lower":70, "past_upper":100,    "current_century":2000, "past_century":1900 ]);      TimeRange parse(string fmt,string arg,void|TimeRange context)   {