| @@ 139-155 (lines=17) @@ | ||
| 136 | ||
| 137 | $this->date_time->setDate( Events::$date_start->format( 'Y' ), $month, $day ); |
|
| 138 | ||
| 139 | switch ( $this->local[ 'default_calendar' ] ) { |
|
| 140 | ||
| 141 | case 'shamsi': |
|
| 142 | ||
| 143 | $this->date_time->setDate( 1394, $month, $day ); |
|
| 144 | ||
| 145 | $this->date_time = $this->convert->shamsiToGregorian( $this->date_time ); |
|
| 146 | ||
| 147 | break; |
|
| 148 | ||
| 149 | case 'ghamari': |
|
| 150 | ||
| 151 | $this->date_time = $this->convert->ghamariToGregorian( $this->date_time ); |
|
| 152 | ||
| 153 | break; |
|
| 154 | ||
| 155 | } |
|
| 156 | ||
| 157 | $this->result[ $this->date_time->format( 'Y-m-d' ) ][] = $event; |
|
| 158 | ||
| @@ 389-407 (lines=19) @@ | ||
| 386 | ||
| 387 | public function toGregorian( $type = 'gr' ) { |
|
| 388 | ||
| 389 | switch ( $type ) { |
|
| 390 | ||
| 391 | case 'ir': |
|
| 392 | ||
| 393 | $this->date_time = $this->convert_calendar->shamsiToGregorian( $this->date_time ); |
|
| 394 | ||
| 395 | break; |
|
| 396 | ||
| 397 | case 'gh': |
|
| 398 | ||
| 399 | $this->date_time = $this->convert_calendar->ghamariToGregorian( $this->date_time ); |
|
| 400 | ||
| 401 | case 'gr': |
|
| 402 | ||
| 403 | $this->date_time = $this->date_time; |
|
| 404 | ||
| 405 | break; |
|
| 406 | ||
| 407 | } |
|
| 408 | ||
| 409 | $this->calendar_type = 'gr'; |
|
| 410 | ||