Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated dependencies & readme #3

Merged
merged 1 commit into from
Jun 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- "master"
schedule:
- cron: '* 8 * * *'

jobs:
compatibility:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/static-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- "master"
schedule:
- cron: '* 8 * * *'

jobs:
compatibility:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- "master"
schedule:
- cron: '* 8 * * *'

jobs:
compatibility:
Expand Down
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Time Management Framework for PHP
This library provides simple but really flexible abstraction representing holidays of any type.

```php
<?php
use Aeon\Calendar\Gregorian\Day;
use Aeon\Calendar\Gregorian\Holidays\HolidayName;

interface Holidays
{
Expand All @@ -28,11 +31,11 @@ interface Holidays

final class Holiday
{
public function __construct(Day $day, HolidayName $name)
public function __construct(Day $day, HolidayName $name) {}

public function day() : Day
public function day() : Day {}

public function name(?string $locale = null) : string
public function name(?string $locale = null) : string {}
}
```

Expand All @@ -44,6 +47,11 @@ This implementation does not provide any holidays, it's just merging holidays fr
an array of holidays in `holidaysAt`.

```php
<?php
use Aeon\Calendar\Gregorian\Day;
use Aeon\Calendar\Gregorian\Holidays\GoogleCalendar\CountryCodes;
use Aeon\Calendar\Gregorian\Holidays\GoogleCalendarRegionalHolidays;
use Aeon\Calendar\Gregorian\Holidays\HolidaysChain;

$holidays = new HolidaysChain(
new GoogleCalendarRegionalHolidays(CountryCodes::US),
Expand All @@ -62,6 +70,10 @@ if ($holidays->isHoliday(Day::fromString('2020-01-01'))) {
This implementations uses google calendar api to get holidays for different countries.

```php
<?php
use Aeon\Calendar\Gregorian\Day;
use Aeon\Calendar\Gregorian\Holidays\GoogleCalendar\CountryCodes;
use Aeon\Calendar\Gregorian\Holidays\GoogleCalendarRegionalHolidays;

$holidays = new GoogleCalendarRegionalHolidays(CountryCodes::US);

Expand All @@ -84,6 +96,9 @@ any above method will not trigger parsing json files again.
This implementation does not provide any holidays, use it when you are a robot that works whole year with any break.

```php
<?php
use Aeon\Calendar\Gregorian\Day;
use Aeon\Calendar\Gregorian\Holidays\EmptyHolidays;

$holidays = new EmptyHolidays();

Expand Down
55 changes: 30 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.