1 | <?php |
||
22 | class DateTimeCloner |
||
23 | { |
||
24 | private const DATE_FORMAT_FOR_CLONE = 'Y-m-d H:i:s e'; |
||
25 | |||
26 | /** |
||
27 | * @param \DateTimeInterface $originalDate |
||
28 | * |
||
29 | * @throws UnexpectedValueException |
||
30 | * |
||
31 | * @return \DateTime |
||
32 | */ |
||
33 | public static function cloneIntoDateTime(\DateTimeInterface $originalDate): \DateTime |
||
47 | |||
48 | /** |
||
49 | * @param \DateTimeInterface $originalDate |
||
50 | * |
||
51 | * @throws UnexpectedValueException |
||
52 | * |
||
53 | * @return \DateTimeImmutable |
||
54 | */ |
||
55 | public static function cloneIntoDateTimeImmutable(\DateTimeInterface $originalDate): \DateTimeImmutable |
||
69 | } |
||
70 |