Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukashron/calendar
PHP extend for Czech calendar.
https://github.com/lukashron/calendar
calendar czech-language php
Last synced: about 1 month ago
JSON representation
PHP extend for Czech calendar.
- Host: GitHub
- URL: https://github.com/lukashron/calendar
- Owner: lukashron
- License: mit
- Created: 2022-01-20T21:14:05.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-11T10:34:31.000Z (almost 3 years ago)
- Last Synced: 2024-04-21T08:03:00.252Z (8 months ago)
- Topics: calendar, czech-language, php
- Language: PHP
- Homepage: https://www.lukashron.cz
- Size: 205 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP extend for Czech calendar.
![alt text](https://github.com/lukashron/calendar/blob/master/screenshot.png?raw=true)
Installation
------------
```
composer require lukashron/calendar
```Example
-------
```php
$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 dayswww.lukashron.cz