Exemple #1
0
 def __init__(self):
     choices = {
         "(last | past) <day>": "last day",
         "(next | this) <day>": "next day",
         "last week <day>": "last week",
         "next week <day>": "next week",
     }
     extras = [Day("day")]
     Choice.__init__(self, name=None, choices=choices, extras=extras)
Exemple #2
0
 def __init__(self):
     choices = {
         "<n> days ago": -1,
         "yesterday": -1,
         "today": 0,
         "tomorrow": +1,
         "in <n> days": +1,
     }
     extras = [IntegerRef("n", 1, 100)]
     Choice.__init__(self, name=None, choices=choices, extras=extras)
Exemple #3
0
 def __init__(self, name):
     Choice.__init__(self, name=name, choices=day_names)
Exemple #4
0
 def __init__(self, name):
     Choice.__init__(self, name=name, choices=month_names)
Exemple #5
0
 def __init__(self, spec):
     Choice.__init__(self, spec, {spec: True})
Exemple #6
0
 def __init__(self, spec):
     Choice.__init__(self, spec, {spec: True})