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


Python periods.Month類代碼示例

本文整理匯總了Python中schedule.periods.Month的典型用法代碼示例。如果您正苦於以下問題:Python Month類的具體用法?Python Month怎麽用?Python Month使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: test_years_before_1900

 def test_years_before_1900(self):
     d = datetime.date(year=1899, month=1, day=1)
     m = Month([], d)
     try:
         m.name()
     except ValueError as value_error:
         self.fail(value_error)
開發者ID:Gustavosdo,項目名稱:django-scheduler,代碼行數:7,代碼來源:test_periods.py

示例2: monthly_schedule

def monthly_schedule(request, year, month):
    if int(year) > 2037 or int(year) < 1970 or int(month) < 1 or int(month) > 12:
        raise Http404

    MonthlyScheduleFormset = formset_factory(wraps(MonthlyScheduleForm)(partial(MonthlyScheduleForm, days=monthrange(int(year), int(month))[1])), extra=0)

    initial_data = []
    for barber in Barber.objects.all():
        data = {}
        calendar = Calendar.objects.get_or_create(name='barber_schedule')[0]
        month_period = Month(calendar.events.get_for_object(barber), datetime(int(year), int(month), 1))
        for day_period in month_period.get_days():
            if day_period.has_occurrences():
                data['day_{}'.format(day_period.start.day)] = True
        initial_data.append(data)

    if request.method == 'POST':
        formset = MonthlyScheduleFormset(request.POST, initial=initial_data)
        if formset.is_valid():
            for form, barber in zip(formset, Barber.objects.all()):
                for day in form.changed_data:
                    if not form.cleaned_data[day]:
                        calendar = Calendar.objects.get(name='barber_schedule')
                        events = calendar.events.get_for_object(barber)
                        period = Day(events, datetime(int(year), int(month), int(day[4:])))
                        if period.has_occurrences():
                            for occurrence in period.get_occurrences():
                                Event.objects.get(id=occurrence.event_id).delete()
                    else:
                        calendar = Calendar.objects.get_or_create(name='barber_schedule')[0]
                        event = Event(
                            start=make_aware(datetime(int(year), int(month), int(day[4:]), settings.DAY_START)),
                            end=make_aware(datetime(int(year), int(month), int(day[4:]), settings.DAY_END))
                        )
                        event.save()
                        calendar.events.add(event)
                        relation = EventRelation.objects.create_relation(event, barber)
                        relation.save()

    else:
        formset = MonthlyScheduleFormset(initial=initial_data)

    context = dict(
        admin.site.each_context(request),
        days=range(1, monthrange(int(year), int(month))[1] + 1),
        first_weekday=monthrange(int(year), int(month))[0],
        barbers=zip(Barber.objects.all(), formset),
        formset=formset,
        prev_date=(datetime(int(year), int(month), 1) - timedelta(days=1)),
        current_date=datetime.now(),
        next_date=(datetime(int(year), int(month), monthrange(int(year), int(month))[1]) + timedelta(days=1)),
    )
    if request.method == 'POST':
        return redirect(reverse('admin:monthly_schedule', kwargs={'year': year, 'month': month}), context)
    else:
        return render(request, 'admin/monthly_schedule.html', context)
開發者ID:funn,項目名稱:factory,代碼行數:56,代碼來源:views.py

示例3: TestMonth

class TestMonth(TestCase):
    def setUp(self):
        rule = Rule(frequency = "WEEKLY")
        rule.save()
        data = {
                'title': 'Recent Event',
                'start': datetime.datetime(2008, 1, 5, 8, 0),
                'end': datetime.datetime(2008, 1, 5, 9, 0),
                'end_recurring_period' : datetime.datetime(2008, 5, 5, 0, 0),
                'rule': rule,
               }
        recurring_event = Event(**data)
        recurring_event.save()
        self.month = Month(events=Event.objects.all(),
                           date=datetime.datetime(2008, 2, 7, 9, 0))
    def test_get_weeks(self):
        weeks = self.month.get_weeks()
        self.assertEqual([(week.start,week.end) for week in weeks],
            [
                (datetime.datetime(2008, 1, 27, 0, 0),
                datetime.datetime(2008, 2, 3, 0, 0)),
                (datetime.datetime(2008, 2, 3, 0, 0),
                datetime.datetime(2008, 2, 10, 0, 0)),
                (datetime.datetime(2008, 2, 10, 0, 0),
                 datetime.datetime(2008, 2, 17, 0, 0)),
                (datetime.datetime(2008, 2, 17, 0, 0),
                 datetime.datetime(2008, 2, 24, 0, 0)),
                (datetime.datetime(2008, 2, 24, 0, 0),
                 datetime.datetime(2008, 3, 2, 0, 0))
            ])

    def test_get_days(self):
        weeks = self.month.get_weeks()
        week = weeks[0]
        days = week.get_days()
        self.assertEqual(
            [
                (len(day.occurrences), day.start,day.end) for day in days
            ],
            [
                (0, datetime.datetime(2008, 1, 27, 0, 0),
                 datetime.datetime(2008, 1, 28, 0, 0)),
                (0, datetime.datetime(2008, 1, 28, 0, 0),
                 datetime.datetime(2008, 1, 29, 0, 0)),
                (0, datetime.datetime(2008, 1, 29, 0, 0),
                 datetime.datetime(2008, 1, 30, 0, 0)),
                (0, datetime.datetime(2008, 1, 30, 0, 0),
                 datetime.datetime(2008, 1, 31, 0, 0)),
                (0, datetime.datetime(2008, 1, 31, 0, 0),
                 datetime.datetime(2008, 2, 1, 0, 0)),
                (0, datetime.datetime(2008, 2, 1, 0, 0),
                 datetime.datetime(2008, 2, 2, 0, 0)),
                (1, datetime.datetime(2008, 2, 2, 0, 0),
                 datetime.datetime(2008, 2, 3, 0, 0))]
            )
開發者ID:TheProjecter,項目名稱:pinax-cohousing,代碼行數:55,代碼來源:tests.py

示例4: test_get_values

 def test_get_values(self):
     self.client.login(username='admin', password='pa55w0rd')
     date = datetime.datetime(2015, 6, 1)
     resp = self.client.get(reverse('admin:monthly_schedule', kwargs={'year': date.year, 'month': date.month}))
     formset = resp.context['formset']
     self.assertEqual(len(formset), Barber.objects.all().count())
     for form, barber in zip(formset, Barber.objects.all()):
         month = Month(self.calendar.events.get_for_object(barber), date=date)
         self.assertEqual(len(form.visible_fields()), len(list(month.get_days())))
         self.assertEqual(len(form.changed_data), len(month.get_occurrences()))
         for day, occ in zip(form.changed_data, month.cached_get_sorted_occurrences()):
             self.assertEqual(int(day[4:]), occ.end.day)
開發者ID:funn,項目名稱:factory,代碼行數:12,代碼來源:tests.py

示例5: month_table

def month_table(context,  calendar, month, size="regular", shift=None):
    if shift:
        if shift == -1:
            month = Month(calendar.events.all(), month.prev())
        if shift == 1:
            month = Month(calendar.events.all(), month.next())
    if size == "small":
        context['day_names']  = weekday_abbrs
    else:
        context['day_names']  = weekday_names
    context['calendar'] = calendar
    context['month'] = month
    context['size'] = size
    return context
開發者ID:sepow,項目名稱:biblnet,代碼行數:14,代碼來源:scheduletags.py

示例6: setUp

 def setUp(self):
     rule = Rule.objects.create(frequency="WEEKLY")
     cal = Calendar.objects.create(name="MyCal")
     Event.objects.create(
         title='Recent Event',
         start=datetime.datetime(2008, 1, 5, 8, 0, tzinfo=pytz.utc),
         end=datetime.datetime(2008, 1, 5, 9, 0, tzinfo=pytz.utc),
         end_recurring_period=datetime.datetime(2008, 5, 5, 0, 0, tzinfo=pytz.utc),
         rule=rule,
         calendar=cal,
     )
     self.month = Month(events=Event.objects.all(),
                        date=datetime.datetime(2008, 2, 7, 9, 0, tzinfo=pytz.utc))
開發者ID:Alcolo47,項目名稱:django-scheduler,代碼行數:13,代碼來源:test_periods.py

示例7: TestMonth

class TestMonth(TestCase):
    def setUp(self):
        rule = Rule(frequency="WEEKLY")
        rule.save()
        cal = Calendar(name="MyCal")
        cal.save()
        data = {
            "title": "Recent Event",
            "start": datetime.datetime(2008, 1, 5, 8, 0),
            "end": datetime.datetime(2008, 1, 5, 9, 0),
            "end_recurring_period": datetime.datetime(2008, 5, 5, 0, 0),
            "rule": rule,
            "calendar": cal,
        }
        recurring_event = Event(**data)
        recurring_event.save()
        self.month = Month(events=Event.objects.all(), date=datetime.datetime(2008, 2, 7, 9, 0))

    def test_get_weeks(self):
        weeks = self.month.get_weeks()
        self.assertEqual(
            [(week.start, week.end) for week in weeks],
            [
                (datetime.datetime(2008, 1, 27, 0, 0), datetime.datetime(2008, 2, 3, 0, 0)),
                (datetime.datetime(2008, 2, 3, 0, 0), datetime.datetime(2008, 2, 10, 0, 0)),
                (datetime.datetime(2008, 2, 10, 0, 0), datetime.datetime(2008, 2, 17, 0, 0)),
                (datetime.datetime(2008, 2, 17, 0, 0), datetime.datetime(2008, 2, 24, 0, 0)),
                (datetime.datetime(2008, 2, 24, 0, 0), datetime.datetime(2008, 3, 2, 0, 0)),
            ],
        )

    def test_get_days(self):
        weeks = self.month.get_weeks()
        week = weeks[0]
        days = week.get_days()
        self.assertEqual(
            [(len(day.occurrences), day.start, day.end) for day in days],
            [
                (0, datetime.datetime(2008, 1, 27, 0, 0), datetime.datetime(2008, 1, 28, 0, 0)),
                (0, datetime.datetime(2008, 1, 28, 0, 0), datetime.datetime(2008, 1, 29, 0, 0)),
                (0, datetime.datetime(2008, 1, 29, 0, 0), datetime.datetime(2008, 1, 30, 0, 0)),
                (0, datetime.datetime(2008, 1, 30, 0, 0), datetime.datetime(2008, 1, 31, 0, 0)),
                (0, datetime.datetime(2008, 1, 31, 0, 0), datetime.datetime(2008, 2, 1, 0, 0)),
                (0, datetime.datetime(2008, 2, 1, 0, 0), datetime.datetime(2008, 2, 2, 0, 0)),
                (1, datetime.datetime(2008, 2, 2, 0, 0), datetime.datetime(2008, 2, 3, 0, 0)),
            ],
        )

    def test_month_convenience_functions(self):
        self.assertEqual(self.month.prev_month(), datetime.datetime(2008, 1, 1, 0, 0))
        self.assertEqual(self.month.next_month(), datetime.datetime(2008, 3, 1, 0, 0))
        self.assertEqual(self.month.current_year(), datetime.datetime(2008, 1, 1, 0, 0))
        self.assertEqual(self.month.prev_year(), datetime.datetime(2007, 1, 1, 0, 0))
        self.assertEqual(self.month.next_year(), datetime.datetime(2009, 1, 1, 0, 0))
開發者ID:senyai,項目名稱:django-schedule,代碼行數:54,代碼來源:test_periods.py

示例8: setUp

 def setUp(self):
     rule = Rule(frequency = "WEEKLY")
     rule.save()
     data = {
             'title': 'Recent Event',
             'start': datetime.datetime(2008, 1, 5, 8, 0),
             'end': datetime.datetime(2008, 1, 5, 9, 0),
             'end_recurring_period' : datetime.datetime(2008, 5, 5, 0, 0),
             'rule': rule,
            }
     recurring_event = Event(**data)
     recurring_event.save()
     self.month = Month(events=Event.objects.all(),
                        date=datetime.datetime(2008, 2, 7, 9, 0))
開發者ID:schacon,項目名稱:django-schedule,代碼行數:14,代碼來源:tests.py

示例9: setUp

 def setUp(self):
     rule = Rule.objects.create(frequency="WEEKLY")
     cal = Calendar.objects.create(name="MyCal")
     data = {
         'title': 'Recent Event',
         'start': datetime.datetime(2008, 1, 5, 8, 0, tzinfo=pytz.utc),
         'end': datetime.datetime(2008, 1, 5, 9, 0, tzinfo=pytz.utc),
         'end_recurring_period': datetime.datetime(2008, 5, 5, 0, 0, tzinfo=pytz.utc),
         'rule': rule,
         'calendar': cal
     }
     Event.objects.create(**data)
     self.month = Month(events=Event.objects.all(),
                        date=datetime.datetime(2008, 2, 7, 9, 0, tzinfo=pytz.utc))
開發者ID:drodger,項目名稱:django-scheduler,代碼行數:14,代碼來源:test_periods.py

示例10: setUp

 def setUp(self):
     rule = Rule(frequency="WEEKLY")
     rule.save()
     cal = Room(name="MyCal")
     cal.save()
     data = {
         "title": "Recent Reservation",
         "start": datetime.datetime(2008, 1, 5, 8, 0),
         "end": datetime.datetime(2008, 1, 5, 9, 0),
         "end_recurring_period": datetime.datetime(2008, 5, 5, 0, 0),
         "rule": rule,
         "room": cal,
     }
     recurring_reservation = Reservation(**data)
     recurring_reservation.save()
     self.month = Month(reservations=Reservation.objects.all(), date=datetime.datetime(2008, 2, 7, 9, 0))
開發者ID:bjdag1234,項目名稱:django-schedule-rooms,代碼行數:16,代碼來源:test_periods.py

示例11: setUp

 def setUp(self):
     rule = Rule(frequency="WEEKLY")
     rule.save()
     cal = Calendar(name="MyCal")
     cal.save()
     data = {
         "title": "Recent Event",
         "start": datetime.datetime(2008, 1, 5, 8, 0),
         "end": datetime.datetime(2008, 1, 5, 9, 0),
         "end_recurring_period": datetime.datetime(2008, 5, 5, 0, 0),
         "rule": rule,
         "calendar": cal,
     }
     recurring_event = Event(**data)
     recurring_event.save()
     self.month = Month(events=Event.objects.all(), date=datetime.datetime(2008, 2, 7, 9, 0))
開發者ID:senyai,項目名稱:django-schedule,代碼行數:16,代碼來源:test_periods.py

示例12: TestMonth

class TestMonth(TestCase):

    def setUp(self):
        rule = Rule(frequency = "WEEKLY")
        rule.save()
        cal = Calendar(name="MyCal")
        cal.save()
        data = {
                'title': 'Recent Event',
                'start': datetime.datetime(2008, 1, 5, 8, 0, tzinfo=pytz.utc),
                'end': datetime.datetime(2008, 1, 5, 9, 0, tzinfo=pytz.utc),
                'end_recurring_period' : datetime.datetime(2008, 5, 5, 0, 0, tzinfo=pytz.utc),
                'rule': rule,
                'calendar': cal
               }
        recurring_event = Event(**data)
        recurring_event.save()
        self.month = Month(events=Event.objects.all(),
                           date=datetime.datetime(2008, 2, 7, 9, 0, tzinfo=pytz.utc))

    def test_get_weeks(self):
        weeks = self.month.get_weeks()
        actuals = [(week.start, week.end) for week in weeks]

        if settings.FIRST_DAY_OF_WEEK == 0:
            expecteds = [
                (datetime.datetime(2008, 1, 27, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 2, 3, 0, 0, tzinfo=pytz.utc)),
                (datetime.datetime(2008, 2, 3, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 2, 10, 0, 0, tzinfo=pytz.utc)),
                (datetime.datetime(2008, 2, 10, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 2, 17, 0, 0, tzinfo=pytz.utc)),
                (datetime.datetime(2008, 2, 17, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 2, 24, 0, 0, tzinfo=pytz.utc)),
                (datetime.datetime(2008, 2, 24, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 3, 2, 0, 0, tzinfo=pytz.utc))
            ]
        else:
            expecteds = [
                (datetime.datetime(2008, 1, 28, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 2, 4, 0, 0, tzinfo=pytz.utc)),
                (datetime.datetime(2008, 2, 4, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 2, 11, 0, 0, tzinfo=pytz.utc)),
                (datetime.datetime(2008, 2, 11, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 2, 18, 0, 0, tzinfo=pytz.utc)),
                (datetime.datetime(2008, 2, 18, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 2, 25, 0, 0, tzinfo=pytz.utc)),
                (datetime.datetime(2008, 2, 25, 0, 0, tzinfo=pytz.utc),
                 datetime.datetime(2008, 3, 3, 0, 0, tzinfo=pytz.utc))
            ]

        for actual, expected in zip(actuals, expecteds):
            self.assertEqual(actual, expected)

    def test_get_days(self):
        weeks = self.month.get_weeks()
        week = list(weeks)[0]
        days = week.get_days()
        actuals = [(len(day.occurrences), day.start,day.end) for day in days]

        if settings.FIRST_DAY_OF_WEEK == 0:
            expecteds = [
                (
                    0,
                    datetime.datetime(2008, 1, 27, 0, 0, tzinfo=pytz.utc),
                    datetime.datetime(2008, 1, 28, 0, 0, tzinfo=pytz.utc)
                ),
                (
                    0,
                    datetime.datetime(2008, 1, 28, 0, 0, tzinfo=pytz.utc),
                    datetime.datetime(2008, 1, 29, 0, 0, tzinfo=pytz.utc)
                ),
                (
                    0,
                    datetime.datetime(2008, 1, 29, 0, 0, tzinfo=pytz.utc),
                    datetime.datetime(2008, 1, 30, 0, 0, tzinfo=pytz.utc)
                ),
                (
                    0,
                    datetime.datetime(2008, 1, 30, 0, 0, tzinfo=pytz.utc),
                    datetime.datetime(2008, 1, 31, 0, 0, tzinfo=pytz.utc)
                ),
                (
                    0,
                    datetime.datetime(2008, 1, 31, 0, 0, tzinfo=pytz.utc),
                    datetime.datetime(2008, 2, 1, 0, 0, tzinfo=pytz.utc)
                ),
                (
                    0,
                    datetime.datetime(2008, 2, 1, 0, 0, tzinfo=pytz.utc),
                    datetime.datetime(2008, 2, 2, 0, 0, tzinfo=pytz.utc)
                ),
                (
                    1,
                    datetime.datetime(2008, 2, 2, 0, 0, tzinfo=pytz.utc),
                    datetime.datetime(2008, 2, 3, 0, 0, tzinfo=pytz.utc)
                ),
            ]

        else:
#.........這裏部分代碼省略.........
開發者ID:Gustavosdo,項目名稱:django-scheduler,代碼行數:101,代碼來源:test_periods.py

示例13: TestMonth

class TestMonth(TestCase):
    def setUp(self):
        rule = Rule(frequency="WEEKLY")
        rule.save()
        cal = Room(name="MyCal")
        cal.save()
        data = {
            "title": "Recent Reservation",
            "start": datetime.datetime(2008, 1, 5, 8, 0),
            "end": datetime.datetime(2008, 1, 5, 9, 0),
            "end_recurring_period": datetime.datetime(2008, 5, 5, 0, 0),
            "rule": rule,
            "room": cal,
        }
        recurring_reservation = Reservation(**data)
        recurring_reservation.save()
        self.month = Month(reservations=Reservation.objects.all(), date=datetime.datetime(2008, 2, 7, 9, 0))

    def test_get_weeks(self):
        weeks = self.month.get_weeks()
        actuals = [(week.start, week.end) for week in weeks]

        if FIRST_DAY_OF_WEEK == 0:
            expecteds = [
                (datetime.datetime(2008, 1, 27, 0, 0), datetime.datetime(2008, 2, 3, 0, 0)),
                (datetime.datetime(2008, 2, 3, 0, 0), datetime.datetime(2008, 2, 10, 0, 0)),
                (datetime.datetime(2008, 2, 10, 0, 0), datetime.datetime(2008, 2, 17, 0, 0)),
                (datetime.datetime(2008, 2, 17, 0, 0), datetime.datetime(2008, 2, 24, 0, 0)),
                (datetime.datetime(2008, 2, 24, 0, 0), datetime.datetime(2008, 3, 2, 0, 0)),
            ]
        else:
            expecteds = [
                (datetime.datetime(2008, 1, 28, 0, 0), datetime.datetime(2008, 2, 4, 0, 0)),
                (datetime.datetime(2008, 2, 4, 0, 0), datetime.datetime(2008, 2, 11, 0, 0)),
                (datetime.datetime(2008, 2, 11, 0, 0), datetime.datetime(2008, 2, 18, 0, 0)),
                (datetime.datetime(2008, 2, 18, 0, 0), datetime.datetime(2008, 2, 25, 0, 0)),
                (datetime.datetime(2008, 2, 25, 0, 0), datetime.datetime(2008, 3, 3, 0, 0)),
            ]

        for actual, expected in zip(actuals, expecteds):
            self.assertEqual(actual, expected)

    def test_get_days(self):
        weeks = self.month.get_weeks()
        week = list(weeks)[0]
        days = week.get_days()
        actuals = [(len(day.occurrences), day.start, day.end) for day in days]

        if FIRST_DAY_OF_WEEK == 0:
            expecteds = [
                (0, datetime.datetime(2008, 1, 27, 0, 0), datetime.datetime(2008, 1, 28, 0, 0)),
                (0, datetime.datetime(2008, 1, 28, 0, 0), datetime.datetime(2008, 1, 29, 0, 0)),
                (0, datetime.datetime(2008, 1, 29, 0, 0), datetime.datetime(2008, 1, 30, 0, 0)),
                (0, datetime.datetime(2008, 1, 30, 0, 0), datetime.datetime(2008, 1, 31, 0, 0)),
                (0, datetime.datetime(2008, 1, 31, 0, 0), datetime.datetime(2008, 2, 1, 0, 0)),
                (0, datetime.datetime(2008, 2, 1, 0, 0), datetime.datetime(2008, 2, 2, 0, 0)),
                (1, datetime.datetime(2008, 2, 2, 0, 0), datetime.datetime(2008, 2, 3, 0, 0)),
            ]

        else:
            expecteds = [
                (0, datetime.datetime(2008, 1, 28, 0, 0), datetime.datetime(2008, 1, 29, 0, 0)),
                (0, datetime.datetime(2008, 1, 29, 0, 0), datetime.datetime(2008, 1, 30, 0, 0)),
                (0, datetime.datetime(2008, 1, 30, 0, 0), datetime.datetime(2008, 1, 31, 0, 0)),
                (0, datetime.datetime(2008, 1, 31, 0, 0), datetime.datetime(2008, 2, 1, 0, 0)),
                (0, datetime.datetime(2008, 2, 1, 0, 0), datetime.datetime(2008, 2, 2, 0, 0)),
                (1, datetime.datetime(2008, 2, 2, 0, 0), datetime.datetime(2008, 2, 3, 0, 0)),
                (0, datetime.datetime(2008, 2, 3, 0, 0), datetime.datetime(2008, 2, 4, 0, 0)),
            ]

        for actual, expected in zip(actuals, expecteds):
            self.assertEqual(actual, expected)

    def test_month_convenience_functions(self):
        self.assertEqual(self.month.prev_month().start, datetime.datetime(2008, 1, 1, 0, 0))
        self.assertEqual(self.month.next_month().start, datetime.datetime(2008, 3, 1, 0, 0))
        self.assertEqual(self.month.current_year().start, datetime.datetime(2008, 1, 1, 0, 0))
        self.assertEqual(self.month.prev_year().start, datetime.datetime(2007, 1, 1, 0, 0))
        self.assertEqual(self.month.next_year().start, datetime.datetime(2009, 1, 1, 0, 0))
開發者ID:bjdag1234,項目名稱:django-schedule-rooms,代碼行數:79,代碼來源:test_periods.py


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