1 | <?php |
||
9 | class DateTimeImmutable extends \DateTimeImmutable { |
||
10 | public function __construct($time = 'now', DateTimeZone $timezone = null) |
||
22 | |||
23 | /** |
||
24 | * @param \DateTimeInterface $dt |
||
25 | * |
||
26 | * @return static |
||
27 | */ |
||
28 | public static function instance(\DateTimeInterface $dt) |
||
35 | |||
36 | /** |
||
37 | * @param string $format |
||
38 | * @param string $time |
||
39 | * @param \DateTimeZone $timezone |
||
40 | * @return DateTimeImmutable |
||
41 | */ |
||
42 | public static function createFromFormat($format, $time, $timezone = null) |
||
51 | |||
52 | /** |
||
53 | * @param \DateTime $dateTime |
||
54 | * @return DateTimeImmutable |
||
55 | */ |
||
56 | public static function createFromMutable($dateTime) : DateTimeImmutable |
||
61 | |||
62 | /** |
||
63 | * @param int|string $timestamp |
||
64 | * @return DateTimeImmutable |
||
65 | */ |
||
66 | public static function createFromTimestamp($timestamp) : DateTimeImmutable |
||
72 | |||
73 | public static function createFromJson(string $json) : DateTimeImmutable |
||
85 | |||
86 | /** |
||
87 | * Returns the default Dandomain time zone |
||
88 | * |
||
89 | * @return DateTimeZone |
||
90 | */ |
||
91 | public static function defaultTimeZone() : \DateTimeZone |
||
95 | } |