Skip to main content
`Ctrl`+`K`

# pandas.tseries.offsets.HalfYearBegin.is_on_offset

HalfYearBegin.is_on_offset(dt)

  Return boolean whether a timestamp intersects with this frequency.

  This method checks if a given datetime falls on a valid half-year boundary as defined by this offset.

  Parameters:
    dt datetime

      Timestamp to check intersections with frequency.

  Returns:
    bool

      True if the timestamp is on the offset, False otherwise.

  See also

  `HalfYearEnd.is_on_offset`

    Check if a timestamp is at the end of a half-year.

  `HalfYearBegin.is_on_offset`

    Check if a timestamp is at the start of a half-year.

  `BHalfYearEnd.is_on_offset`

    Check if a timestamp is at the end of a business half-year.

  `BHalfYearBegin.is_on_offset`

    Check if a timestamp is at the start of a business half-year.

  Examples

      >>> freq = pd.offsets.BHalfYearBegin()
      >>> ts = pd.Timestamp(2022, 1, 1)
      >>> freq.is_on_offset(ts)
      False

      >>> ts = pd.Timestamp(2022, 1, 3)
      >>> freq.is_on_offset(ts)
      True