PHPackages                             hashandsalt/kirby3-yasumi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hashandsalt/kirby3-yasumi

ActiveKirby-plugin[Utility &amp; Helpers](/categories/utility)

hashandsalt/kirby3-yasumi
=========================

Kirby 3 - Yasumi

v2.0.0(1mo ago)5231MITPHP

Since Feb 14Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/HashandSalt/kirby3-yasumi)[ Packagist](https://packagist.org/packages/hashandsalt/kirby3-yasumi)[ RSS](/packages/hashandsalt-kirby3-yasumi/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (4)Versions (5)Used By (0)

Kirby Yasumi
============

[](#kirby-yasumi)

This plugin provides dates and names of holidays and other special celebrations from various countries and states for any year using the [Yasumi](https://github.com/azuyalabs/yasumi) library. It is calculation and rule-driven, avoiding the need for a comprehensive database.

Installation
------------

[](#installation)

### Manual

[](#manual)

To use this plugin, place all the files in `site/plugins/kirby-yasumi`.

### Git submodule

[](#git-submodule)

```
git submodule add https://github.com/hashandsalt/kirby-yasumi.git site/plugins/yasumi

```

### Composer

[](#composer)

```
composer require hashandsalt/kirby-yasumi

```

Tip

This plugin is free but if you use it in a commercial project please consider to [make a donation 🍻](https://paypal.me/hashandsalt?locale.x=en_GB).

Holidays collection
-------------------

[](#holidays-collection)

The plugin provides a Holidays collection with an interface similar to Kirby's Pages object. Holidays are filtered by country and year and can be translated to a given locale. If they are not specified manually, these settings are taken from the current Kirby context automatically, using the current system language and the current year.

Note

Previously, this plugin was providing the Yasumi object directly. As of version 2.0 it returns a dedicated Holidays collection. If you need to access the Yasumi object, use `$site->yasumi()`.

In the frontend, there are two ways to access the collection:

1. Using the site method: `$site->holidays('Germany', 2020, 'de_DE')`.
2. Using the global collection: `$kirby->collection('holidays')`.

If you need variable holiday information, use the site method which allows for direct customization.

If your holiday context does not change, use the global collection which can be set up via the Kirby configuration.

### Options

[](#options)

The Holidays collection accepts the following settings:

- `country`: The name of the country or region, e. g. `UnitedKingdom` or `Germany/LowerSaxony`. Full coverage information is available on the Yasumi website, . If you don't provide an country name, it is automatically fetched from the current locale.
- `year`: The year you want to get the holidays for. This defaults to the current year.
- `locale`: The locale used to retrieve holiday names. This defaults to the current Kirby locale. If you need the holiday names in the current language of your install (whether is only uses a single language or offers multilingual content) there is no need to set this manually.

The site method accepts these options as direct arguments:

```
