1.1 --- a/vRecurrence.py Sun Jun 04 20:15:44 2017 +0200
1.2 +++ b/vRecurrence.py Mon Jun 05 18:33:05 2017 +0200
1.3 @@ -139,18 +139,32 @@
1.4 if len(parts) < 2:
1.5 continue
1.6 key, value = parts
1.7 +
1.8 + # Accept frequency indicators as qualifiers.
1.9 +
1.10 if key == "FREQ" and freq.has_key(value):
1.11 qualifier = frequency = (value, {})
1.12 +
1.13 + # Accept interval indicators for frequency qualifier parameterisation.
1.14 +
1.15 elif key == "INTERVAL":
1.16 interval = int(value)
1.17 continue
1.18 +
1.19 + # Accept enumerators as qualifiers.
1.20 +
1.21 elif enum.has_key(key):
1.22 qualifier = (key, {"values" : get_qualifier_values(key, value)})
1.23 +
1.24 + # Ignore other items.
1.25 +
1.26 else:
1.27 continue
1.28
1.29 qualifiers.append(qualifier)
1.30
1.31 + # Parameterise any frequency qualifier with the interval.
1.32 +
1.33 if frequency:
1.34 frequency[1]["interval"] = interval
1.35
1.36 @@ -560,8 +574,10 @@
1.37 unit_interval = units.get(self.qualifier, 1)
1.38 unit_step = scale(unit_interval, self.pos)
1.39
1.40 - # Combine specific context details with the pattern context. This should
1.41 - # make the result more specific than the pattern context.
1.42 + # Combine supplied context details with the pattern context. This should
1.43 + # provide additional resolution information that may be missing from the
1.44 + # supplied context. For example, the outer selector may indicate a month
1.45 + # context, but this selector may need day information.
1.46
1.47 current = combine(context, first)
1.48 results = []