use ToStringTrait;
- const FORMAT = 'Y-m-d H:i:s';
+ const FORMAT = 'Y-m-d H:i:s';
/**
* A RFC7231 Compliant date.
*
- * http://tools.ietf.org/html/rfc7231#section-7.1.1.1
+ * @see http://tools.ietf.org/html/rfc7231#section-7.1.1.1
*
* Example: Sun, 06 Nov 1994 08:49:37 GMT
*/
return $format;
}
-
/**
* Examines getLastErrors() to see what errors to report.
*
* Formats the date for display.
*
* @param string $format
- * A format string using either PHP's date().
+ * Format accepted by date().
* @param array $settings
* - timezone: (optional) String timezone name. Defaults to the timezone
* of the date object.
$this->dateTimeObject->setTime(12, 0, 0);
}
+ /**
+ * Gets a clone of the proxied PHP \DateTime object wrapped by this class.
+ *
+ * @return \DateTime
+ * A clone of the wrapped PHP \DateTime object.
+ */
+ public function getPhpDateTime() {
+ return clone $this->dateTimeObject;
+ }
+
}