# HG changeset patch # User Paul Boddie # Date 1373839611 -7200 # Node ID 146ac9008e8b5ae1bdf202f23b23715c579c1927 # Parent deb6bdca9d1b242bd1c7b9ec5b6d2d3724313ee8 Acquire a token after reading a month label. diff -r deb6bdca9d1b -r 146ac9008e8b RecurrenceSupport.py --- a/RecurrenceSupport.py Mon Jul 15 00:00:00 2013 +0200 +++ b/RecurrenceSupport.py Mon Jul 15 00:06:51 2013 +0200 @@ -310,6 +310,7 @@ if word in month_labels: current.add_details("the", word, month_labels.index(word) + 1, "month", intervals["month"]) + words.want() # Handle the qualifier and interval. diff -r deb6bdca9d1b -r 146ac9008e8b tests/test_recurrence.py --- a/tests/test_recurrence.py Mon Jul 15 00:00:00 2013 +0200 +++ b/tests/test_recurrence.py Mon Jul 15 00:06:51 2013 +0200 @@ -44,6 +44,14 @@ print s print "->", getRecurrence(s) +s = "the second day of every other month from January of 2012" +print s +print "->", getRecurrence(s) + +s = "the second day of every other month from 2012-01" +print s +print "->", getRecurrence(s) + s = "the second hour in the second day in the second month of every year" print s print "->", getRecurrence(s)