1 | <?php |
||
7 | class Month extends Enum |
||
8 | { |
||
9 | const JANUARY = 'January'; |
||
10 | const FEBRUARY = 'February'; |
||
11 | const MARCH = 'March'; |
||
12 | const APRIL = 'April'; |
||
13 | const MAY = 'May'; |
||
14 | const JUNE = 'June'; |
||
15 | const JULY = 'July'; |
||
16 | const AUGUST = 'August'; |
||
17 | const SEPTEMBER = 'September'; |
||
18 | const OCTOBER = 'October'; |
||
19 | const NOVEMBER = 'November'; |
||
20 | const DECEMBER = 'December'; |
||
21 | |||
22 | /** |
||
23 | * Get current Month |
||
24 | * |
||
25 | * @return Month |
||
26 | */ |
||
27 | 4 | public static function now() |
|
33 | |||
34 | /** |
||
35 | * Returns Month from a native PHP \DateTime |
||
36 | * |
||
37 | * @param \DateTime $date |
||
38 | * @return Month |
||
39 | */ |
||
40 | 8 | public static function fromNativeDateTime(\DateTime $date) |
|
46 | |||
47 | /** |
||
48 | * Returns a numeric representation of the Month. |
||
49 | * 1 for January to 12 for December. |
||
50 | * |
||
51 | * @return int |
||
52 | */ |
||
53 | 11 | public function getNumericValue() |
|
57 | } |
||
58 |
This method has been deprecated.