定制 thiagomarini/not-tomorrow 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thiagomarini/not-tomorrow

Composer 安装命令:

composer require thiagomarini/not-tomorrow

包简介

PHP library to calculate the next working day. You can also check if a given date is a holiday or if the next day is on weekend.

README 文档

README

CircleCI License: MIT

What for?

PHP library to calculate the next working day. Handy if you work with delivery only on weekdays.

You can also check if a given date is a holiday or if the next day is on weekend.

Requirements

Relies on handlers to work

Right now it can only calculate workdays for:

  • England and Whales 🇬🇧

Feel free to contribute and send more handlers via pull requests. Handlers need to implement AnnualHolidays interface.

Basic Usage

<?php

use NotTomorrow\Calendar;

// Create a calendar class with a handler
$calendar = new Calendar(new EnglandWhalesHolidays());

// Check if next day of a given date is on weekend 
$calendar->isNextDayOnWeekend(new \DateTime('2017-04-01'));

// Check if a given date is a holiday
$calendar->isHoliday(new \DateTime('2017-12-25'));

//Find the next working day
$calendar->findNextWorkingDay($friday);

License

MIT

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固