Branch: Tag:

2012-09-09

2012-09-09 20:59:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Calendar.Events: Added generic solar events.

145:    case "Equinox":    if (sscanf(rule, "Equinox%*[ \t]%s", string type)) {    switch(String.trim_all_whites(type)) { -  case "Vernal": +  case "Vernal": case "Northward":    return Event.Solar(0); -  case "Autumnal": +  case "Autumnal": case "Southward":    return Event.Solar(2);    }    }    error("Events: rule error; unknown rule format:\n%O\n",source);    -  +  case "Solstice": +  if (sscanf(rule, "Solstice%*[ \t]%s", string type)) { +  switch(String.trim_all_whites(type)) { +  case "Summer": case "Northern": +  return Event.Solar(1); +  case "Winter": case "Southern": +  return Event.Solar(3); +  } +  } +  error("Events: rule error; unknown rule format:\n%O\n",source); +     case "Weekday":    if (sscanf(rule,"Weekday%*[ \t]%s%*[ \t]%d days",    wd,days)>=2 && (n=wd2n[wd]))