1 | <?php |
||
5 | class DateTime |
||
6 | { |
||
7 | |||
8 | /** |
||
9 | * indicates that the HTML input type is 'date' |
||
10 | */ |
||
11 | public const TYPE_DATE = 'date'; |
||
12 | |||
13 | /** |
||
14 | * indicates that the HTML input type is 'datetime-local' |
||
15 | */ |
||
16 | public const TYPE_DATETIME_LOCAL = 'datetime-local'; |
||
17 | |||
18 | /** |
||
19 | * indicates that the HTML input type is 'month' |
||
20 | */ |
||
21 | public const TYPE_MONTH = 'month'; |
||
22 | |||
23 | /** |
||
24 | * indicates that the HTML input type is 'time' |
||
25 | */ |
||
26 | public const TYPE_TIME = 'time'; |
||
27 | |||
28 | /** |
||
29 | * indicates that the HTML input type is 'week' |
||
30 | */ |
||
31 | public const TYPE_WEEK = 'week'; |
||
32 | |||
33 | // CUSTOM EE DATE TYPES |
||
34 | |||
35 | /** |
||
36 | * indicates that the input is an HTML dropdown used for selecting the day for a date |
||
37 | */ |
||
38 | public const TYPE_SELECT_DAY = 'day-select'; |
||
39 | |||
40 | /** |
||
41 | * indicates that the input is an HTML dropdown used for selecting the month for a date |
||
42 | */ |
||
43 | public const TYPE_SELECT_MONTH = 'month-select'; |
||
44 | |||
45 | /** |
||
46 | * indicates that the input is an HTML dropdown used for selecting the year for a date |
||
47 | */ |
||
48 | public const TYPE_SELECT_YEAR = 'year-select'; |
||
49 | |||
50 | |||
51 | /** |
||
52 | * @var array |
||
53 | */ |
||
54 | private $valid_type_options; |
||
55 | |||
56 | |||
57 | public function __construct() |
||
73 | |||
74 | |||
75 | /** |
||
76 | * @param bool $constants_only |
||
77 | * @return array |
||
78 | */ |
||
79 | public function validTypeOptions(bool $constants_only = false): array |
||
85 | } |
||
86 |