src/Charcoal/Object/ObjectSchedule.php
public function setScheduledDate($ts)
    {
        if ($ts === null) {
            $this->scheduledDate = null;
            return $this;
        }

        if (is_string($ts)) {
            try {
                $ts = new DateTime($ts);
            } catch (Exception $e) {
                throw new InvalidArgumentException(sprintf(
                    '%s (%s)',
                    $e->getMessage(),
                    $ts
                ), 0, $e);
            }
        }

        if (!($ts instanceof DateTimeInterface)) {
            throw new InvalidArgumentException(
                'Invalid "Processing Date" value. Must be a date/time string or a DateTime object.'
            );
        }

        $this->scheduledDate = $ts;

        return $this;
    }
public function setScheduledDate($ts)
    {
        if ($ts === null) {
            $this->scheduledDate = null;
            return $this;
        }

        if (is_string($ts)) {
            try {
                $ts = new DateTime($ts);
            } catch (Exception $e) {
                throw new InvalidArgumentException(sprintf(
                    '%s (%s)',
                    $e->getMessage(),
                    $ts
                ), 0, $e);
            }
        }

        if (!($ts instanceof DateTimeInterface)) {
            throw new InvalidArgumentException(
                'Invalid "Processing Date" value. Must be a date/time string or a DateTime object.'
            );
        }

        $this->scheduledDate = $ts;

        return $this;
    }
Set the date/time the item should be processed at.

@param  null|string|DateTimeInterface $ts A date/time string or object.
@throws InvalidArgumentException If the date/time is invalid.
@return ObjectScheduleInterface Chainable