src/ORM/FieldType/DBDate.php
protected function explodeDateString($value)
    {
        // split on known delimiters (. / -)
        if (!preg_match(
            '#^(?<first>\\d+)[-/\\.](?<second>\\d+)[-/\\.](?<third>\\d+)(?<time>.*)$#',
            $value,
            $matches
        )) {
            throw new InvalidArgumentException(
                "Invalid date: '$value'. Use " . self::ISO_DATE . " to prevent this error."
            );
        }

        $parts = [
            $matches['first'],
            $matches['second'],
            $matches['third']
        ];
        // Flip d-m-y to y-m-d
        if ($parts[0] < 1000 && $parts[2] > 1000) {
            $parts = array_reverse($parts);
        }
        if ($parts[0] < 1000 && (int)$parts[0] !== 0) {
            throw new InvalidArgumentException(
                "Invalid date: '$value'. Use " . self::ISO_DATE . " to prevent this error."
            );
        }
        $parts[] = $matches['time'];
        return $parts;
    }
protected function explodeDateString($value)
    {
        // split on known delimiters (. / -)
        if (!preg_match(
            '#^(?<first>\\d+)[-/\\.](?<second>\\d+)[-/\\.](?<third>\\d+)(?<time>.*)$#',
            $value,
            $matches
        )) {
            throw new InvalidArgumentException(
                "Invalid date: '$value'. Use " . self::ISO_DATE . " to prevent this error."
            );
        }

        $parts = [
            $matches['first'],
            $matches['second'],
            $matches['third']
        ];
        // Flip d-m-y to y-m-d
        if ($parts[0] < 1000 && $parts[2] > 1000) {
            $parts = array_reverse($parts);
        }
        if ($parts[0] < 1000 && (int)$parts[0] !== 0) {
            throw new InvalidArgumentException(
                "Invalid date: '$value'. Use " . self::ISO_DATE . " to prevent this error."
            );
        }
        $parts[] = $matches['time'];
        return $parts;
    }
protected function explodeDateString ( $ value ) { // split on known delimiters (. / -) if ( ! preg_match ( '#^(?<first>\\d+)[-/\\.](?<second>\\d+)[-/\\.](?<third>\\d+)(?<time>.*)$#' , $ value , $ matches ) ) { throw new InvalidArgumentException ( "Invalid date: '$value'. Use " . self :: ISO_DATE . " to prevent this error." ) ; } $ parts = [ $ matches [ 'first' ] , $ matches [ 'second' ] , $ matches [ 'third' ] ] ; // Flip d-m-y to y-m-d if ( $ parts [ 0 ] < 1000 && $ parts [ 2 ] > 1000 ) { $ parts = array_reverse ( $ parts ) ; } if ( $ parts [ 0 ] < 1000 && ( int ) $ parts [ 0 ] !== 0 ) { throw new InvalidArgumentException ( "Invalid date: '$value'. Use " . self :: ISO_DATE . " to prevent this error." ) ; } $ parts [ ] = $ matches [ 'time' ] ; return $ parts ; }
Attempt to split date string into year, month, day, and timestamp components.

@param string $value
@return array
Attempt to split date string into year month day and timestamp components .