1 | <?php |
||
13 | final class DateTimeHelper extends \Nette\Object |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * Try to convert string into DateTime object |
||
18 | * @param mixed $value |
||
19 | * @param string[] $formats |
||
20 | * @return \DateTime |
||
21 | * @throws DataGridDateTimeHelperException |
||
22 | */ |
||
23 | public static function tryConvertToDateTime($value, array $formats = []) |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Try to convert string into DateTime object from more date formats |
||
31 | * @param mixed $value |
||
32 | * @param string[] $formats |
||
33 | * @return \DateTime |
||
34 | * @throws DataGridDateTimeHelperException |
||
35 | */ |
||
36 | public static function tryConvertToDate($value, array $formats = []) |
||
40 | |||
41 | |||
42 | /** |
||
43 | * Convert string into DateTime object from more date without time |
||
44 | * @param mixed $value |
||
45 | * @param string[] $formats |
||
46 | * @return \DateTime |
||
47 | * @throws DataGridDateTimeHelperException |
||
48 | */ |
||
49 | public static function fromString($value, array $formats = []) |
||
90 | |||
91 | } |
||
92 |