| 1 | <?php |
||
| 20 | final class Month extends Integer implements DateTimeInterface |
||
| 21 | {
|
||
| 22 | use DateTimeTrait; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param integer $value |
||
| 26 | */ |
||
| 27 | 31 | public function __construct($value) |
|
| 28 | {
|
||
| 29 | 31 | parent::__construct($value); |
|
| 30 | 30 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @return static |
||
| 34 | */ |
||
| 35 | 13 | public static function now() |
|
| 36 | {
|
||
| 37 | 13 | return new static(self::getNowDateTimeFormat('j'));
|
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | 25 | public function __toString() |
|
| 47 | |||
| 48 | /** |
||
| 49 | * From String. |
||
| 50 | * |
||
| 51 | * @param $string |
||
| 52 | * @return static |
||
| 53 | */ |
||
| 54 | 1 | public static function fromString($string) |
|
| 58 | |||
| 59 | /** |
||
| 60 | * From Native |
||
| 61 | * |
||
| 62 | * @param \DateTime $native |
||
| 63 | * @return DateTimeInterface |
||
| 64 | */ |
||
| 65 | 1 | public static function fromNative(\DateTime $native) |
|
| 69 | |||
| 70 | /** |
||
| 71 | * @return int |
||
| 72 | */ |
||
| 73 | 1 | public function getMaximum() |
|
| 77 | |||
| 78 | /** |
||
| 79 | * @return int |
||
| 80 | */ |
||
| 81 | 1 | public function getMinimum() |
|
| 85 | } |
||
| 86 |