Exemplo n.º 1
0
 /**
  * Convert a Julian day in a specific calendar to a day/month/year.
  *
  * Julian days outside the specified range are returned as “0/0/0”.
  *
  * @param CalendarInterface $calendar
  * @param integer           $julian_day
  * @param integer           $min_jd
  * @param integer           $max_jd
  *
  * @return string
  */
 private static function jdToCalendar(CalendarInterface $calendar, $julian_day, $min_jd, $max_jd)
 {
     if ($julian_day >= $min_jd && $julian_day <= $max_jd) {
         list($year, $month, $day) = $calendar->jdToYmd($julian_day);
         return $month . '/' . $day . '/' . $year;
     } else {
         return '0/0/0';
     }
 }
Exemplo n.º 2
0
 public function todayYmd()
 {
     return $this->calendar->jdToYmd(unixtojd());
 }