src/LocalDate.php
private function resolvePreviousValid(int $year, int $month, int $day) : LocalDate
    {
        if ($day > 28) {
            $day = \min($day, YearMonth::of($year, $month)->getLengthOfMonth());
        }

        return new LocalDate($year, $month, $day);
    }
private function resolvePreviousValid(int $year, int $month, int $day) : LocalDate
    {
        if ($day > 28) {
            $day = \min($day, YearMonth::of($year, $month)->getLengthOfMonth());
        }

        return new LocalDate($year, $month, $day);
    }
private function resolvePreviousValid ( int $ year , int $ month , int $ day ) : LocalDate { if ( $ day > 28 ) { $ day = \ min ( $ day , YearMonth :: of ( $ year , $ month ) -> getLengthOfMonth ( ) ) ; } return new LocalDate ( $ year , $ month , $ day ) ; }
Resolves the date, resolving days past the end of month.

@param int $year  The year to represent, validated from MIN_YEAR to MAX_YEAR.
@param int $month The month-of-year to represent, validated from 1 to 12.
@param int $day   The day-of-month to represent, validated from 1 to 31.

@return LocalDate
Resolves the date resolving days past the end of month .