1 | <?php |
||
9 | class DateTimeImmutable extends \DateTimeImmutable |
||
10 | { |
||
11 | 2 | public function __construct($time = 'now') |
|
19 | |||
20 | /** |
||
21 | * @param \DateTimeInterface $dt |
||
22 | * |
||
23 | * @return static |
||
24 | */ |
||
25 | public static function instance(\DateTimeInterface $dt) |
||
33 | |||
34 | /** |
||
35 | * @param string $format |
||
36 | * @param string $time |
||
37 | * @param \DateTimeZone $timezone |
||
38 | * @return DateTimeImmutable |
||
39 | */ |
||
40 | public static function createFromFormat($format, $time, $timezone = null) |
||
49 | |||
50 | /** |
||
51 | * @param \DateTime $dateTime |
||
52 | * @return DateTimeImmutable |
||
53 | */ |
||
54 | public static function createFromMutable($dateTime) : DateTimeImmutable |
||
59 | |||
60 | /** |
||
61 | * @param int|string $timestamp |
||
62 | * @return DateTimeImmutable |
||
63 | */ |
||
64 | public static function createFromTimestamp($timestamp) : DateTimeImmutable |
||
70 | |||
71 | public static function createFromJson(string $json) : DateTimeImmutable |
||
83 | |||
84 | /** |
||
85 | * Returns the default Dandomain time zone |
||
86 | * |
||
87 | * @return DateTimeZone |
||
88 | */ |
||
89 | 1 | protected static function timeZone() : DateTimeZone |
|
93 | } |
||
94 |