Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php
public static function DAYOFMONTH($dateValue = 1)
    {
        $dateValue = Functions::flattenSingleValue($dateValue);

        if ($dateValue === null) {
            $dateValue = 1;
        } elseif (is_string($dateValue = self::getDateValue($dateValue))) {
            return Functions::VALUE();
        }

        if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) {
            if ($dateValue < 0.0) {
                return Functions::NAN();
            } elseif ($dateValue < 1.0) {
                return 0;
            }
        }

        // Execute function
        $PHPDateObject = Date::excelToDateTimeObject($dateValue);

        return (int) $PHPDateObject->format('j');
    }
public static function DAYOFMONTH($dateValue = 1)
    {
        $dateValue = Functions::flattenSingleValue($dateValue);

        if ($dateValue === null) {
            $dateValue = 1;
        } elseif (is_string($dateValue = self::getDateValue($dateValue))) {
            return Functions::VALUE();
        }

        if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) {
            if ($dateValue < 0.0) {
                return Functions::NAN();
            } elseif ($dateValue < 1.0) {
                return 0;
            }
        }

        // Execute function
        $PHPDateObject = Date::excelToDateTimeObject($dateValue);

        return (int) $PHPDateObject->format('j');
    }
public static function DAYOFMONTH ( $ dateValue = 1 ) { $ dateValue = Functions :: flattenSingleValue ( $ dateValue ) ; if ( $ dateValue === null ) { $ dateValue = 1 ; } elseif ( is_string ( $ dateValue = self :: getDateValue ( $ dateValue ) ) ) { return Functions :: VALUE ( ) ; } if ( Functions :: getCompatibilityMode ( ) == Functions :: COMPATIBILITY_EXCEL ) { if ( $ dateValue < 0.0 ) { return Functions :: NAN ( ) ; } elseif ( $ dateValue < 1.0 ) { return 0 ; } } // Execute function $ PHPDateObject = Date :: excelToDateTimeObject ( $ dateValue ) ; return ( int ) $ PHPDateObject -> format ( 'j' ) ; }
DAYOFMONTH.

Returns the day of the month, for a specified date. The day is given as an integer
ranging from 1 to 31.

Excel Function:
DAY(dateValue)

@param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
PHP DateTime object, or a standard date string

@return int Day of the month
DAYOFMONTH .