diff --git a/src/DateObject.php b/src/DateObject.php index eb12219..3c89a5b 100644 --- a/src/DateObject.php +++ b/src/DateObject.php @@ -18,6 +18,15 @@ */ class DateObject extends DateTime { + /** + * @param $timestamp + * @return static + */ + public static function createFromTimestamp($timestamp) + { + return new static(date('Y-m-d H:i:s', $timestamp)); + } + /** * @return string */