MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / _first_of_quarter

Method _first_of_quarter

src/pendulum/date.py:635–644  ·  view source on GitHub ↗

Modify to the first occurrence of a given day of the week in the current quarter. If no day_of_week is provided, modify to the first day of the quarter. Use the supplied consts to indicate the desired day_of_week, ex. pendulum.MONDAY.

(self, day_of_week: WeekDay | None = None)

Source from the content-addressed store, hash-verified

633 return None
634
635 def _first_of_quarter(self, day_of_week: WeekDay | None = None) -> Self:
636 """
637 Modify to the first occurrence of a given day of the week
638 in the current quarter. If no day_of_week is provided,
639 modify to the first day of the quarter. Use the supplied consts
640 to indicate the desired day_of_week, ex. pendulum.MONDAY.
641 """
642 return self.set(self.year, self.quarter * 3 - 2, 1).first_of(
643 "month", day_of_week
644 )
645
646 def _last_of_quarter(self, day_of_week: WeekDay | None = None) -> Self:
647 """

Callers

nothing calls this directly

Calls 2

setMethod · 0.95
first_ofMethod · 0.45

Tested by

no test coverage detected