项目作者: natitech

项目描述 :
PHP standalone library to manipulate business days
高级语言: PHP
项目地址: git://github.com/natitech/businesscal.git
创建时间: 2019-01-23T23:31:20Z
项目社区:https://github.com/natitech/businesscal

开源协议:MIT License

下载


Businesscal

Build Status
Latest Stable Version
License

PHP standalone library to manipulate business days

Installation

  1. composer require nati/businesscal

Version 6.x is compatible with PHP 7.4 and PHP 8.0 but is not maintained anymore.
Version 7.x is compatible with PHP 8.1+ and is the current maintained version.

Usage

  1. //You can pick up a holiday calendar from Nati\Businesscal\Holidays namespace or create your own implementing Nati\Businesscal\Holidays\HolidaysCalendar
  2. $calendar = new Nati\Businesscal\BusinessCalendar(new FrHolidaysCalendar);
  3. //To know if a given date is a business day
  4. $calendar->isBusinessDay(new \DateTimeImmutable());
  5. //To add some business days to a given date
  6. $calendar->addNbBusinessDaysTo(new \DateTimeImmutable(), 20);