@@ -32,27 +32,27 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function prev(){
|
| 35 | - $year = $this->year; |
|
| 36 | - $month = $this->month; |
|
| 35 | + $year = $this->year; |
|
| 36 | + $month = $this->month; |
|
| 37 | 37 | |
| 38 | 38 | if($month == 1){
|
| 39 | 39 | $month = 12; |
| 40 | - $year--; |
|
| 40 | + $year--; |
|
| 41 | 41 | } else {
|
| 42 | 42 | $month--; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - return ["year" => $year, "month"=>$month]; |
|
| 45 | + return ["year" => $year, "month"=>$month]; |
|
| 46 | 46 | } |
| 47 | 47 | public function next(){
|
| 48 | - $year = $this->year; |
|
| 48 | + $year = $this->year; |
|
| 49 | 49 | $month = $this->month; |
| 50 | - if($month == 12){
|
|
| 51 | - $month = 1; |
|
| 52 | - $year++; |
|
| 53 | - } else {
|
|
| 54 | - $month++; |
|
| 55 | - } |
|
| 50 | + if($month == 12){
|
|
| 51 | + $month = 1; |
|
| 52 | + $year++; |
|
| 53 | + } else {
|
|
| 54 | + $month++; |
|
| 55 | + } |
|
| 56 | 56 | return ["year" => $year, "month"=>$month]; |
| 57 | 57 | } |
| 58 | 58 | public function addWeek($week) |
@@ -17,11 +17,9 @@ discard block |
||
| 17 | 17 | public function getValues($year = null, $month = null){
|
| 18 | 18 | if($year && $month){
|
| 19 | 19 | $this->setYear($year)->setMonth($month); |
| 20 | - } |
|
| 21 | - else if(isset($_GET['year']) && isset($_GET['month'])){
|
|
| 20 | + } else if(isset($_GET['year']) && isset($_GET['month'])){
|
|
| 22 | 21 | $this->setYear($_GET['year'])->setMonth($_GET['month']); |
| 23 | - } |
|
| 24 | - else {
|
|
| 22 | + } else {
|
|
| 25 | 23 | $this->setYear(date('Y'))->setMonth(date('m'));
|
| 26 | 24 | } |
| 27 | 25 | } |
@@ -270,8 +268,7 @@ discard block |
||
| 270 | 268 | } else {
|
| 271 | 269 | if($count[$day->getDayOfMonthNumber()] == null){
|
| 272 | 270 | $id = 0; |
| 273 | - } |
|
| 274 | - else{
|
|
| 271 | + } else{
|
|
| 275 | 272 | $id = $day->getDayOfMonthNumber(); |
| 276 | 273 | } |
| 277 | 274 | |