PHPackages                             crtl/openings - 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. crtl/openings

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

crtl/openings
=============

This package provides basic functionality to determine openings such as shop or restaurant openings.

1.1.0(6y ago)035MITPHPPHP &gt;=5.4

Since Mar 8Pushed 6y agoCompare

[ Source](https://github.com/crtl/openings)[ Packagist](https://packagist.org/packages/crtl/openings)[ RSS](/packages/crtl-openings/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Openings
========

[](#openings)

This package provides basic functionality to determine openings such as shop or restaurant openings.

Features
--------

[](#features)

- Provide openings in an easy array syntax
- Handle exceptional openings such als holidays, christmas etc.

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

[](#installation)

```
composer require crtl/openings

```

Examples / Usage
----------------

[](#examples--usage)

### Format

[](#format)

Openings and opening exceptions must have the following format:

```
[
    "key" => ["H:i-H:i", "H:i-H:i"],
    "key1, key1 , keyN" => ["H:i-H:i"],
    "key-key" => ["H:i-H:i"]
]
```

Where **key** is one of the following date formats:

- `D` for openings
- `Y/m/d` for opening exceptions

### Usage

[](#usage)

```
