src/Resolver/DateTimeResolver.php
public function resolveExpressionValue($subject, InspectedValue $inspection)
    {
        $name = $inspection->name;
        
        if (\strlen($name) > 1) {
            switch ($name) {
                case 'year':
                    $name = 'Y';
                    break;
                case 'month':
                    $name = 'n';
                    break;
                case 'day':
                    $name = 'j';
                    break;
                case 'hours':
                    $name = 'G';
                    break;
                case 'minutes':
                    $name = 'i';
                    break;
                case 'seconds':
                    $name = 's';
                    break;
                case 'timezone':
                    $name = 'e';
                    break;
                case 'offset':
                    $name = 'P';
                    break;
                case 'timestamp':
                    $name = 'U';
                    break;
            }
        }
        
        switch ($name) {
            case 'd':
            case 'D':
            case 'j':
            case 'l':
            case 'N':
            case 'S':
            case 'w':
            case 'z':
            case 'W':
            case 'F':
            case 'm':
            case 'M':
            case 'n':
            case 't':
            case 'L':
            case 'o':
            case 'y':
            case 'Y':
            case 'a':
            case 'A':
            case 'B':
            case 'g':
            case 'G':
            case 'h':
            case 'H':
            case 'i':
            case 's':
            case 'U':
            case 'e':
            case 'I':
            case 'O':
            case 'P':
            case 'T':
            case 'Z':
            case 'c':
            case 'r':
            case 'U':
                $inspection->value = $subject->format($name);
                
                return true;
        }
        
        return false;
    }
public function resolveExpressionValue($subject, InspectedValue $inspection)
    {
        $name = $inspection->name;
        
        if (\strlen($name) > 1) {
            switch ($name) {
                case 'year':
                    $name = 'Y';
                    break;
                case 'month':
                    $name = 'n';
                    break;
                case 'day':
                    $name = 'j';
                    break;
                case 'hours':
                    $name = 'G';
                    break;
                case 'minutes':
                    $name = 'i';
                    break;
                case 'seconds':
                    $name = 's';
                    break;
                case 'timezone':
                    $name = 'e';
                    break;
                case 'offset':
                    $name = 'P';
                    break;
                case 'timestamp':
                    $name = 'U';
                    break;
            }
        }
        
        switch ($name) {
            case 'd':
            case 'D':
            case 'j':
            case 'l':
            case 'N':
            case 'S':
            case 'w':
            case 'z':
            case 'W':
            case 'F':
            case 'm':
            case 'M':
            case 'n':
            case 't':
            case 'L':
            case 'o':
            case 'y':
            case 'Y':
            case 'a':
            case 'A':
            case 'B':
            case 'g':
            case 'G':
            case 'h':
            case 'H':
            case 'i':
            case 's':
            case 'U':
            case 'e':
            case 'I':
            case 'O':
            case 'P':
            case 'T':
            case 'Z':
            case 'c':
            case 'r':
            case 'U':
                $inspection->value = $subject->format($name);
                
                return true;
        }
        
        return false;
    }
{@inheritdoc}