JulianDays
in package
FinalYes
Gregorian and Julian dates as Julian Day Numbers, for comparing dates: shared by the model ({@see \Korin\Gedcom\Model\Date::days()}) and the plausibility checks.
Table of Contents
Constants
- MONTHS : mixed = ['JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4...
Methods
- day() : int
- Julian Day Number of a date with an astronomical year.
- range() : array{int, int}|null
- The first and last day of a year, a month of it or a day; a day beyond its month counts as the month's last day.
Constants
MONTHS
public
mixed
MONTHS
= ['JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6, 'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' => 10, 'NOV' => 11, 'DEC' => 12]
Methods
day()
Julian Day Number of a date with an astronomical year.
public
static day(int $year, int $month, int $day, bool $julian) : int
Parameters
- $year : int
- $month : int
- $day : int
- $julian : bool
Return values
intrange()
The first and last day of a year, a month of it or a day; a day beyond its month counts as the month's last day.
public
static range(int $year, int|null $month, int|null $day, bool $julian) : array{int, int}|null
Parameters
- $year : int
-
astronomical: 1 BCE is 0
- $month : int|null
-
1–12
- $day : int|null
- $julian : bool
-
the Julian calendar, otherwise the Gregorian one
Return values
array{int, int}|null —null for a year that is not compared