app/Services/CalendarService.php
private function defaultAnniversaries(Builder $query, AbstractCalendarDate $anniv): void
    {
        if ($anniv->day() === 1) {
            $query->where('d_day', '<=', 1);
        } elseif ($anniv->day() === $anniv->daysInMonth()) {
            $query->where('d_day', '>=', $anniv->daysInMonth());
        } else {
            $query->where('d_day', '=', $anniv->day());
        }

        $query->where('d_mon', '=', $anniv->month());
    }
private function defaultAnniversaries(Builder $query, AbstractCalendarDate $anniv): void
    {
        if ($anniv->day() === 1) {
            $query->where('d_day', '<=', 1);
        } elseif ($anniv->day() === $anniv->daysInMonth()) {
            $query->where('d_day', '>=', $anniv->daysInMonth());
        } else {
            $query->where('d_day', '=', $anniv->day());
        }

        $query->where('d_mon', '=', $anniv->month());
    }
private function defaultAnniversaries ( Builder $ query , AbstractCalendarDate $ anniv ) : void { if ( $ anniv -> day ( ) === 1 ) { $ query -> where ( 'd_day' , '<=' , 1 ) ; } elseif ( $ anniv -> day ( ) === $ anniv -> daysInMonth ( ) ) { $ query -> where ( 'd_day' , '>=' , $ anniv -> daysInMonth ( ) ) ; } else { $ query -> where ( 'd_day' , '=' , $ anniv -> day ( ) ) ; } $ query -> where ( 'd_mon' , '=' , $ anniv -> month ( ) ) ; }
By default, missing days have anniversaries on the first of the month,
and invalid days have anniversaries on the last day of the month.

@param Builder              $query
@param AbstractCalendarDate $anniv
By default missing days have anniversaries on the first of the month and invalid days have anniversaries on the last day of the month .