public static function zeroUnusedParts($mode, \DateTimeImmutable $dateTime)
    {
        if ($mode === self::MODE_ZERO_TIME) {
            $dateTime = $dateTime->setTime(0, 0, 0);
        } elseif ($mode === self::MODE_ZERO_DATE) {
            $dateTime = $dateTime->setDate(0, 1, 1);
        }

        return $dateTime;
    }
public static function zeroUnusedParts($mode, \DateTimeImmutable $dateTime)
    {
        if ($mode === self::MODE_ZERO_TIME) {
            $dateTime = $dateTime->setTime(0, 0, 0);
        } elseif ($mode === self::MODE_ZERO_DATE) {
            $dateTime = $dateTime->setDate(0, 1, 1);
        }

        return $dateTime;
    }
public static function zeroUnusedParts ( $ mode , \ DateTimeImmutable $ dateTime ) { if ( $ mode === self :: MODE_ZERO_TIME ) { $ dateTime = $ dateTime -> setTime ( 0 , 0 , 0 ) ; } elseif ( $ mode === self :: MODE_ZERO_DATE ) { $ dateTime = $ dateTime -> setDate ( 0 , 1 , 1 ) ; } return $ dateTime ; }
Zeros the unused parts of the date time according to the processor
mode.

@param string|null        $mode
@param \DateTimeImmutable $dateTime

@return \DateTimeImmutable
Zeros the unused parts of the date time according to the processor mode .