lukashron/calendar

Installs: 37

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/lukashron/calendar

v0.2.4 2022-03-11 09:22 UTC

This package is auto-updated.

Last update: 2025-10-11 18:31:53 UTC


README

alt text

Installation

composer require lukashron/calendar

Example

$myCalendar = new \LukasHron\Calendar\CalendarManager();

$myCalendar->addCalendar(new \LukasHron\Calendar\Country\Czech\Holidays());
$myCalendar->addCalendar(new \LukasHron\Calendar\Country\Czech\Namedays());
$myCalendar->addCalendar(new \LukasHron\Calendar\Country\Czech\Internationaldays());

dump($myCalendar->getYear());
dump($myCalendar->getLabels());
dump($myCalendar->getFullCalendar());
dump($myCalendar->findByDate('1.1.2022'));

Calendar manager method

Setting calendar year setYear(int $year): void

Get calendar year getYear(): int

Add calendar - instance of CalendarInterface addCalendar(CalendarInterface $calendar): void

Get full calendar array getFullCalendar(): array

Get all labels in calendar getLabels(): array

Find by number month and day findByMonthAndDayNumber(int $month, int $day)

Find by number month and day, return simple array findByMonthAndDayNumberSimpleArray(int $month, int $day): array

Get rand event findRandomEvent(?string $calendarLabel = null)

Find day by date findByDate($date)

Implemented calendars

[CZECH]

  • Holidays
  • Name days
  • International days

www.lukashron.cz