Skip to content

Commit

Permalink
Updated dependencies & readme (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech authored Jun 13, 2020
1 parent d905a0e commit c5267a2
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 28 deletions.
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.

0 comments on commit c5267a2

Please sign in to comment.