Lines Matching refs:date
83 public function __construct(array|int|AbstractCalendarDate $date) argument
86 if (is_int($date)) {
87 $this->minimum_julian_day = $date;
88 $this->maximum_julian_day = $date;
89 [$this->year, $this->month, $this->day] = $this->calendar->jdToYmd($date);
95 if (is_array($date)) {
96 $this->day = (int) $date[2];
97 $this->month = static::MONTH_TO_NUMBER[$date[1]] ?? 0;
103 $this->year = $this->extractYear($date[0]);
116 $this->minimum_julian_day = $date->minimum_julian_day;
117 $this->maximum_julian_day = $date->maximum_julian_day;
120 if (get_class($this) === get_class($date)) {
121 $this->year = $date->year;
122 $this->month = $date->month;
123 $this->day = $date->day;
138 if ($date->year === 0) {
140 $today = $date->calendar->jdToYmd(Registry::timestampFactory()->now()->julianDay());
141 …$jd = $date->calendar->ymdToJd($today[0], $date->month, $date->day === 0 ? $today[2] : $date->d…
144 $jd = intdiv($date->maximum_julian_day + $date->minimum_julian_day, 2);
148 if ($date->year === 0) {
151 if ($date->month === 0) {
154 if ($date->day === 0) {
343 * @param AbstractCalendarDate $date
347 public function ageDifference(AbstractCalendarDate $date): array argument
350 if ($this->year === 0 || $date->year === 0) {
355 if (self::compare($this, $date) === 0) {
361 [$year2, $month2, $day2] = $this->calendar->jdToYmd($date->minimum_julian_day);