| @@ 259-275 (lines=17) @@ | ||
| 256 | * |
|
| 257 | * @return $object |
|
| 258 | */ |
|
| 259 | public function from($calendar) |
|
| 260 | { |
|
| 261 | ||
| 262 | $this->convert = new Convert($this->date_time); |
|
| 263 | ||
| 264 | $this->date_time = $this->convert->from($calendar); |
|
| 265 | ||
| 266 | ||
| 267 | /** |
|
| 268 | * We need this part for DayOf class |
|
| 269 | */ |
|
| 270 | $this->calendar_type = $calendar; |
|
| 271 | ||
| 272 | $this->translate_to = $calendar; |
|
| 273 | ||
| 274 | return $this; |
|
| 275 | ||
| 276 | } |
|
| 277 | ||
| 278 | /** |
|
| @@ 285-300 (lines=16) @@ | ||
| 282 | * |
|
| 283 | * @return object |
|
| 284 | */ |
|
| 285 | public function to($calendar) |
|
| 286 | { |
|
| 287 | ||
| 288 | $this->convert = new Convert($this->date_time); |
|
| 289 | ||
| 290 | $this->date_time = $this->convert->to($calendar); |
|
| 291 | ||
| 292 | /** |
|
| 293 | * We need this part for DayOf class |
|
| 294 | */ |
|
| 295 | $this->calendar_type = $calendar; |
|
| 296 | ||
| 297 | $this->translate_to = $calendar; |
|
| 298 | ||
| 299 | return $this; |
|
| 300 | ||
| 301 | } |
|
| 302 | ||
| 303 | ||