public function withExpires($time)
    {
        $date = $this->_getUTCDate($time);

        return $this->withHeader('Expires', $date->format('D, j M Y H:i:s') . ' GMT');
    }
public function withExpires($time)
    {
        $date = $this->_getUTCDate($time);

        return $this->withHeader('Expires', $date->format('D, j M Y H:i:s') . ' GMT');
    }
public function withExpires ( $ time ) { $ date = $ this -> _getUTCDate ( $ time ) ; return $ this -> withHeader ( 'Expires' , $ date -> format ( 'D, j M Y H:i:s' ) . ' GMT' ) ; }
Create a new instance with the Expires header set.

### Examples:

```
// Will Expire the response cache now
$response->withExpires('now')

// Will set the expiration in next 24 hours
$response->withExpires(new DateTime('+1 day'))
```

@param string|\DateTimeInterface $time Valid time string or \DateTime instance.
@return static
Create a new instance with the Expires header set .