2017 © Pedro Peláez
 

project opening-hours

Opening hours component

image

cothema/opening-hours

Opening hours component

  • Wednesday, March 21, 2018
  • by miloshavlicek
  • Repository
  • 1 Watchers
  • 0 Stars
  • 392 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Opening Hours Component

Downloads this Month Latest stable, (*1)

Installation

Install cothema/opening-hours using Composer:, (*2)

$ composer require cothema/opening-hours

Example Usage

use Cothema\OpeningHours\Model\OpeningHours;
use Cothema\OpeningHours\Status;
use Nette\Utils\DateTime;

$openingHours = new OpeningHours;
$openingHours->setOpeningHours([
    '0' => ['10:00', '20:00'], // Sunday
    '1' => ['22:00', '02:00 +1 day'], // Monday
    '2' => ['08:00', '24:00'], // Tuesday
    '3' => ['08:00', '20:00'], // Wednesday
    '4' => ['10:00', '20:00'], // Thursday
    '5' => ['00:00', '20:00'], // Friday
    '6' => ['01:00', '24:00'] // Saturday
]);

$openingHours->addSpecificDay('2015-11-15', ['12:00', '16:00']);
$openingHours->addSpecificDays(['2015-11-20', '2015-11-25'], ['10:00', '01:00 +1 day']);
$openingHours->addSpecificDays(['2015-12-01', '2015-12-02'], FALSE); // Closed all the day

$status = new Status($openingHours);
$status->setTime(new DateTime('2015-11-30 12:00:00')); // Monday
$status->isOpened(); // returns FALSE

The Versions

21/03 2018

dev-master

9999999-dev

Opening hours component

  Sources   Download

MIT GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

by Milos Havlicek

21/03 2018

v1.0.3

1.0.3.0

Opening hours component

  Sources   Download

MIT GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

by Milos Havlicek

15/03 2018

v1.0.2

1.0.2.0

Opening hours component

  Sources   Download

MIT GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

by Milos Havlicek

15/03 2018

v1.0.1

1.0.1.0

Opening hours component

  Sources   Download

MIT GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

by Milos Havlicek

15/03 2018

v1.0

1.0.0.0

Opening hours component

  Sources   Download

MIT GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

by Milos Havlicek