function DatexHejri::yearTotalDays in Datex 7.2
Find days in this year untile now
File
- datex_api/
DatexHejri.inc, line 226
Class
- DatexHejri
- @author Sina Salek
Code
function yearTotalDays($jmonth, $jday, $jyear) {
$year = "";
$month = "";
$year = "";
$result = "";
if ($jmonth == "01") {
return $jday;
}
for ($i = 1; $i < $jmonth || $i == 12; $i++) {
list($year, $month, $day) = $this
->toGregorian($jyear, $i, "1");
$result += lastday($month, $day, $year);
}
return $result + $jday;
}