You are here

public function UpdateJobParameters::setDueDate in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 vendor/smartling/api-sdk-php/src/Jobs/Params/UpdateJobParameters.php \Smartling\Jobs\Params\UpdateJobParameters::setDueDate()

File

vendor/smartling/api-sdk-php/src/Jobs/Params/UpdateJobParameters.php, line 30

Class

UpdateJobParameters
Class UpdateJobParameters @package Jobs\Params

Namespace

Smartling\Jobs\Params

Code

public function setDueDate(\DateTime $dueDate) {
  if ($dueDate
    ->getTimestamp() < time()) {
    throw new \InvalidArgumentException('Job Due Date cannot be in the past.');
  }
  $this
    ->set('dueDate', $dueDate
    ->format('Y-m-d\\TH:i:s\\Z'));
}