| 1 | <?php |
||
| 12 | class DateTime extends \DateTime |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @return string |
||
| 16 | */ |
||
| 17 | public function __toString() |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Check if given date is in same month and year |
||
| 24 | * |
||
| 25 | * @param DateTime $date |
||
| 26 | * @return bool |
||
| 27 | */ |
||
| 28 | public function isSameMonthAndYear(DateTime $date) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param DateTime $date |
||
| 35 | * @return bool |
||
| 36 | */ |
||
| 37 | public function isInPreviousMonth(DateTime $date) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Immutable function to get the start of this month |
||
| 44 | * |
||
| 45 | * @return DateTime |
||
| 46 | */ |
||
| 47 | public function startOfMonth() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Immutable function to get the end of this month |
||
| 56 | * |
||
| 57 | * @return DateTime |
||
| 58 | */ |
||
| 59 | public function endOfMonth() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param DateTime $date |
||
| 68 | * @return DateTime[] |
||
| 69 | */ |
||
| 70 | public function getMonthsBetween(DateTime $date) |
||
| 87 | } |
||
| 88 |