當前位置: 首頁>>代碼示例>>Python>>正文


Python rrule.SU屬性代碼示例

本文整理匯總了Python中dateutil.rrule.SU屬性的典型用法代碼示例。如果您正苦於以下問題:Python rrule.SU屬性的具體用法?Python rrule.SU怎麽用?Python rrule.SU使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在dateutil.rrule的用法示例。


在下文中一共展示了rrule.SU屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: testRRuleAll

# 需要導入模塊: from dateutil import rrule [as 別名]
# 或者: from dateutil.rrule import SU [as 別名]
def testRRuleAll(self):
        from dateutil.rrule import rrule
        from dateutil.rrule import rruleset
        from dateutil.rrule import rrulestr
        from dateutil.rrule import YEARLY, MONTHLY, WEEKLY, DAILY
        from dateutil.rrule import HOURLY, MINUTELY, SECONDLY
        from dateutil.rrule import MO, TU, WE, TH, FR, SA, SU

        rr_all = (rrule, rruleset, rrulestr,
                  YEARLY, MONTHLY, WEEKLY, DAILY,
                  HOURLY, MINUTELY, SECONDLY,
                  MO, TU, WE, TH, FR, SA, SU)

        for var in rr_all:
            self.assertIsNot(var, None)

        # In the public interface but not in all
        from dateutil.rrule import weekday
        self.assertIsNot(weekday, None) 
開發者ID:MediaBrowser,項目名稱:plugin.video.emby,代碼行數:21,代碼來源:test_imports.py

示例2: testRelativeDeltaAll

# 需要導入模塊: from dateutil import rrule [as 別名]
# 或者: from dateutil.rrule import SU [as 別名]
def testRelativeDeltaAll(self):
        from dateutil.relativedelta import relativedelta
        from dateutil.relativedelta import MO, TU, WE, TH, FR, SA, SU

        for var in (relativedelta, MO, TU, WE, TH, FR, SA, SU):
            self.assertIsNot(var, None)

        # In the public interface but not in all
        from dateutil.relativedelta import weekday
        self.assertIsNot(weekday, None) 
開發者ID:MediaBrowser,項目名稱:plugin.video.emby,代碼行數:12,代碼來源:test_imports.py

示例3: __init__

# 需要導入模塊: from dateutil import rrule [as 別名]
# 或者: from dateutil.rrule import SU [as 別名]
def __init__(self):
        BaseCalendarTest.__init__(self)
        self.cal = Calendar(workdays=[0,1,4,6])
        rr = rruleset()
        rr.rrule(rrule(DAILY,
                       byweekday=(MO,TU,FR,SU),
                       dtstart=datetime.datetime(2010,1,1)))
        self.rr = rr
        self.dates = rr.between(datetime.datetime(2010,1,1),
                                datetime.datetime(2013,12,31),
                                inc=True) 
開發者ID:botant,項目名稱:py-business-calendar,代碼行數:13,代碼來源:test_business_calendar.py

示例4: setup_class

# 需要導入模塊: from dateutil import rrule [as 別名]
# 或者: from dateutil.rrule import SU [as 別名]
def setup_class(cls):
        print('\n\nTesting crazy week, Mo,Tu,Fr,SU, WITH holidays, 2010-2013')
        warnings.filterwarnings('ignore', module='business_calendar') 
開發者ID:botant,項目名稱:py-business-calendar,代碼行數:5,代碼來源:test_business_calendar.py


注:本文中的dateutil.rrule.SU屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。