@@ -63,6 +63,10 @@ |
||
| 63 | 63 | * |
| 64 | 64 | *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ |
| 65 | 65 | */ |
| 66 | + |
|
| 67 | + /** |
|
| 68 | + * @param \DateTime $date_time |
|
| 69 | + */ |
|
| 66 | 70 | public function __construct( $date_time = NULL ) { |
| 67 | 71 | |
| 68 | 72 | if ( $date_time !== NULL ) { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | /** |
| 109 | 109 | * Get current datetime |
| 110 | 110 | * @since Aug 17 2015 |
| 111 | - * @return object |
|
| 111 | + * @return Datium |
|
| 112 | 112 | */ |
| 113 | 113 | public static function now() { |
| 114 | 114 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * @param $hour integer |
| 127 | 127 | * @param $minute integer |
| 128 | 128 | * @param $second integer |
| 129 | - * @return object |
|
| 129 | + * @return Datium |
|
| 130 | 130 | */ |
| 131 | 131 | public static function create( $year = 2000, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0 ) { |
| 132 | 132 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | /** |
| 189 | 189 | * Add new date value to current date |
| 190 | 190 | * @param $value string |
| 191 | - * @return object |
|
| 191 | + * @return Datium |
|
| 192 | 192 | */ |
| 193 | 193 | public function add( $value ) { |
| 194 | 194 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | /** |
| 223 | 223 | * Check if current year is leap or not |
| 224 | - * @return boolean |
|
| 224 | + * @return Leap |
|
| 225 | 225 | */ |
| 226 | 226 | public function leap( $type = 'gr') { |
| 227 | 227 | |
@@ -261,6 +261,10 @@ discard block |
||
| 261 | 261 | |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | + /** |
|
| 265 | + * @param string $calendar |
|
| 266 | + * @param string $format |
|
| 267 | + */ |
|
| 264 | 268 | public function translate( $calendar, $format ) { |
| 265 | 269 | |
| 266 | 270 | $this->date_time = new Translate( $this->date_time, $calendar, $format, $this->gregorian_DayofWeek ); |
@@ -337,17 +337,17 @@ |
||
| 337 | 337 | |
| 338 | 338 | switch ( $type ) { |
| 339 | 339 | |
| 340 | - case 'ir': |
|
| 340 | + case 'ir': |
|
| 341 | 341 | |
| 342 | - $this->date_time = $this->convert_calendar->shamsiToGhamari( $this->date_time ); |
|
| 342 | + $this->date_time = $this->convert_calendar->shamsiToGhamari( $this->date_time ); |
|
| 343 | 343 | |
| 344 | - break; |
|
| 344 | + break; |
|
| 345 | 345 | |
| 346 | - case 'gr': |
|
| 346 | + case 'gr': |
|
| 347 | 347 | |
| 348 | - $this->date_time = $this->convert_calendar->gregorianToGhamari( $this->date_time ); |
|
| 348 | + $this->date_time = $this->convert_calendar->gregorianToGhamari( $this->date_time ); |
|
| 349 | 349 | |
| 350 | - break; |
|
| 350 | + break; |
|
| 351 | 351 | |
| 352 | 352 | } |
| 353 | 353 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | 72 | * @since Sept, 14 2015 |
| 73 | - * @return integer |
|
| 73 | + * @return double |
|
| 74 | 74 | */ |
| 75 | 75 | protected function persian_day_of_year() { |
| 76 | 76 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * @since Sept, 14 2015 |
| 96 | - * @return integer |
|
| 96 | + * @return double |
|
| 97 | 97 | */ |
| 98 | 98 | protected function islamic_day_of_year() { |
| 99 | 99 | |
@@ -56,6 +56,10 @@ |
||
| 56 | 56 | * |
| 57 | 57 | *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ |
| 58 | 58 | */ |
| 59 | + |
|
| 60 | + /** |
|
| 61 | + * @param string $path |
|
| 62 | + */ |
|
| 59 | 63 | private function fetch( $path ) { |
| 60 | 64 | |
| 61 | 65 | $this->events = include( $path ); |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | /** |
| 101 | 101 | * check the ghamari year is leap or not |
| 102 | 102 | * @since Oct, 24 2015 |
| 103 | - * @return boolean |
|
| 103 | + * @return integer|null |
|
| 104 | 104 | */ |
| 105 | 105 | public function ghamariLeapYear() { |
| 106 | 106 | |
@@ -20,6 +20,9 @@ |
||
| 20 | 20 | |
| 21 | 21 | protected $english_number = array( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ); |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param \DateTime $date_time |
|
| 25 | + */ |
|
| 23 | 26 | public function __construct( $date_time, $calendar, $format, $gregorian_DayofWeek ){ |
| 24 | 27 | |
| 25 | 28 | $this->translate = include( 'lang/fa/general.php' ); |