weekday_setbuilder.py 文件源码

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

项目:aws-ops-automator 作者: awslabs 项目源码 文件源码
def __init__(self, wrap=True, year=None, month=None, day=None, ignorecase=True):
        """

        :param wrap: Set to True to allow wrapping at last day of the week
        :param year: Year of week to build sets for, only required for date aware '#' and 'L' features in expressions
        :param month: Month of week to build sets for, only required for date aware '#' and 'L' features in expressions
        :param day:  Day in week to build sets for, only required for date aware '#' and 'L' features in expressions
        :param ignorecase: Set to True to ignore case when mapping day names to set values
        """
        SetBuilder.__init__(self,
                            names=calendar.day_abbr,
                            wrap=wrap,
                            ignorecase=ignorecase,
                            significant_name_characters=3,
                            last_item_wildcard=WeekdaySetBuilder.LAST_DAY_WILDCARD)
        self._year = year
        self._month = month
        self._day = day
        self._first_weekday_in_month = None
        self._days_in_month = None

        self._post_custom_parsers = [self._parse_name_number,  # name#num
                                     self._parse_value_number,  # value#num
                                     self._parse_name_last_weekday,  # nameL
                                     self._parse_value_last_weekday]  # valueL
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号