HolidaysNL
class HolidaysNL
Properties
private
_timeZone
private
_year
Method Details
HolidaysNL
public
__construct
(int|null $year = null)
Constructor
HolidaysNL
private
_getCurrentYear
()
Returns the current year as integer
HolidaysNL
private
_validateYear
(int $year, int $min = 0, int $max = 3000)
Check if a valid year was given. Should be between 0 and 3000!
Very arbitrarily use the year 3000 as last possible date
HolidaysNL
private
_validateYearForKingOrQueensDay
(int $year)
Check if a valid year was given. Should be between 1891 and 3000!
HolidaysNL
public
setYear
(int|null $year = null)
Setter for the year property
HolidaysNL
public
getNewYearDateTime
(int|null $year = null)
: DateTime
Returns the new years date (easy one to begin with :-)) as DateTime object.
If no year is given or null is given, the current year will be used.
HolidaysNL
public
getNewYear
(int|null $year = null, bool $excludeYear = false)
: string
Returns the new years date (easy one to begin with :-))
If no year is given or null is given, the current year will be used.
Format is dd-mm-yyyy.
HolidaysNL
public
getEasterDateTime
(int|null $year = null)
: DateTime
Returns Easter date for the given year. If no year is given or null is given, the
current year will be used.
HolidaysNL
public
getEaster
(int|null $year = null, bool $excludeYear = false)
: string
Returns Easter date for the given year. If no year is given or null is given, the
current year will be used.
Format is dd-mm-yyyy.
HolidaysNL
public
getSecondEasterDayDateTime
(int|null $year = null)
: DateTime
Returns Second Easter Day date for the given year. If no year is given or null is given, the
current year will be used.
HolidaysNL
public
getSecondEasterDay
(int|null $year = null, bool $excludeYear = false)
: string
Returns Second Easter Day date for the given year. If no year is given or null is given, the
current year will be used.
Format is dd-mm-yyyy.
HolidaysNL
public
getAscensionDayDateTime
(int|null $year = null)
: DateTime
Returns Ascension date for the given year. If no year is given or null is given, the
current year will be used.
HolidaysNL
public
getAscensionDay
(int|null $year = null, bool $excludeYear = false)
: string
Returns Ascension date for the given year. If no year is given or null is given, the
current year will be used.
Format is dd-mm-yyyy.
HolidaysNL
public
getPentecostDateTime
(int|null $year = null)
: DateTime
Returns Pentecost date for the given year. If no year is given or null is given, the
current year will be used.
HolidaysNL
public
getPentecost
(int|null $year = null, bool $excludeYear = false)
: string
Returns Pentecost date for the given year. If no year is given or null is given, the
current year will be used.
Format is dd-mm-yyyy.
HolidaysNL
public
getSecondPentecostDayDateTime
(int|null $year = null)
: DateTime
Returns Second Pentecost Day date for the given year. If no year is given or null is given, the
current year will be used.
HolidaysNL
public
getSecondPentecostDay
(int|null $year = null, bool $excludeYear = false)
: string
Returns Second Pentecost Day date for the given year. If no year is given or null is given, the
current year will be used.
Format is dd-mm-yyyy.
HolidaysNL
public
getChristmasDateTime
(int|null $year = null)
: DateTime
Returns Christmas date for the given year. If no year is given or null is given, the
current year will be used.
HolidaysNL
public
getChristmas
(int|null $year = null, bool $excludeYear = false)
: string
Returns Christmas date for the given year. If no year is given or null is given, the
current year will be used.
Format is dd-mm-yyyy.
HolidaysNL
public
getSecondChristmasDayDateTime
(int|null $year = null)
: DateTime
Returns Second Christmas Day date for the given year. If no year is given or null is given, the
current year will be used.
HolidaysNL
public
getSecondChristmasDay
(int|null $year = null, bool $excludeYear = false)
: string
Returns Second Christmas Day date for the given year. If no year is given or null is given, the
current year will be used.
Format is dd-mm-yyyy.
HolidaysNL
public
getKingOrQueensDayDateTime
(int|null $year = null)
: DateTime
Returns Queens Day or Kings Day date for the given year.
If no year is given or null is given, the current year will be used.
HolidaysNL
public
getKingOrQueensDay
(int|null $year = null, bool $excludeYear = false)
: string
Returns Queens Day or Kings date for the given year.
If no year is given or null is given, the current year will be used.
Format is dd-mm-yyyy.
HolidaysNL
public
getHolidaysDateTime
(int|null $year = null)
: DateTime[]
Returns all holidays for the given year as an array of \DateTime objects
HolidaysNL
public
getHolidays
(int|null $year = null, bool $excludeYear = false)
: string[]
Returns all holidays for the given year as an array of strings with
the format dd-mm-yyyy
HolidaysNL
public
isHolidayDateTime
(DateTime|null $date = null)
: bool
Checks if a date specified by the given \DateTime object is a holiday
HolidaysNL
public
isHoliday
(string|null $date = null)
: bool
Checks if a date specified by the given \DateTime object is a holiday