# HG changeset patch # User Paul Boddie # Date 1496680385 -7200 # Node ID 58d443925360c5413201831fee6548625d72f85f # Parent f8e01f701116ad76ba12f03808904e3113b1ea96 Added more explanations. diff -r f8e01f701116 -r 58d443925360 vRecurrence.py --- a/vRecurrence.py Sun Jun 04 18:28:18 2017 +0200 +++ b/vRecurrence.py Mon Jun 05 18:33:05 2017 +0200 @@ -139,18 +139,32 @@ if len(parts) < 2: continue key, value = parts + + # Accept frequency indicators as qualifiers. + if key == "FREQ" and freq.has_key(value): qualifier = frequency = (value, {}) + + # Accept interval indicators for frequency qualifier parameterisation. + elif key == "INTERVAL": interval = int(value) continue + + # Accept enumerators as qualifiers. + elif enum.has_key(key): qualifier = (key, {"values" : get_qualifier_values(key, value)}) + + # Ignore other items. + else: continue qualifiers.append(qualifier) + # Parameterise any frequency qualifier with the interval. + if frequency: frequency[1]["interval"] = interval @@ -560,8 +574,10 @@ unit_interval = units.get(self.qualifier, 1) unit_step = scale(unit_interval, self.pos) - # Combine specific context details with the pattern context. This should - # make the result more specific than the pattern context. + # Combine supplied context details with the pattern context. This should + # provide additional resolution information that may be missing from the + # supplied context. For example, the outer selector may indicate a month + # context, but this selector may need day information. current = combine(context, first) results = []