1 | <?php |
||
9 | class Calender |
||
10 | { |
||
11 | /** |
||
12 | * Return a true if the year is a leap year based on the ethiopian calendar. |
||
13 | * |
||
14 | * @param int $year the ethiopian date to be checked |
||
15 | * |
||
16 | * @return bool |
||
17 | */ |
||
18 | public static function isEthiopianLeapYear($year) |
||
30 | |||
31 | /** |
||
32 | * Returns true if the <code>$month, $day and $year</code> passed |
||
33 | * are a valid date based on the ethiopian calendar. |
||
34 | * |
||
35 | * @param int $month Ethiopian month |
||
36 | * @param int $day Ethiopian day |
||
37 | * @param int $year Ethiopian year (negative for AD) |
||
38 | * |
||
39 | * @return bool |
||
40 | */ |
||
41 | public static function ethiopianCheckDate($month, $day, $year) |
||
56 | |||
57 | /** |
||
58 | * Returns the julian date number representation of the |
||
59 | * given ethiopian date. |
||
60 | * |
||
61 | * @param int $month Ethiopian month |
||
62 | * @param int $day Ethiopian day |
||
63 | * @param int $year Ethiopian year (negative for AD) |
||
64 | * |
||
65 | * @return int |
||
66 | */ |
||
67 | public static function ethiopianToJd($month = 1, $day = 1, $year = 2000) |
||
83 | |||
84 | /** |
||
85 | * Returns the ethiopian date string which is represented by |
||
86 | * the passed jdn <br />. |
||
87 | * |
||
88 | * @param int $jdn the Julian Date Number |
||
89 | * @param bool $array if this is true the function returns |
||
90 | * the day,month and year in associative array. |
||
91 | * |
||
92 | * @return array|string |
||
93 | */ |
||
94 | public static function jdToEthiopian($jdn, $array = false) |
||
114 | } |
||
115 |