def __init__(self, year, month):
"""
Initializes monthday set builder.
:param year: Year of month to build sets for, only required for month aware 'W' and 'L' features in expressions
:param month: Month to build sets for, only required for month aware 'W' and 'L' features in expressions
"""
self.year = year
self.month = month
self._firstweekday, self._lastday = calendar.monthrange(year, month)
SetBuilder.__init__(self,
min_value=1,
max_value=self._lastday,
offset=1,
ignorecase=False,
wrap=False,
last_item_wildcard=MonthdaySetBuilder.WILDCARD_LAST_WEEKDAY)
self._post_custom_parsers = [self._parse_weekday]
评论列表
文章目录