monthday_setbuilder.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:aws-ops-automator 作者: awslabs 项目源码 文件源码
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]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号