承接 twix/carbon 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

twix/carbon

Composer 安装命令:

composer require twix/carbon

包简介

This is a wrapper for briannesbitt/carbon which also calculates which days are French bank holidays.

README 文档

README

Build Status codecov.io

Carbon Support for FR Bank Holidays

This extends Carbon and calculates which days are French bank holidays.

Note: For now, it only supports Carbon v2

Read this in other languages: Français

Installation

composer require twix/carbon

Examples

// Checks if the given date is bank holiday
Carbon::isBankHoliday('2020-05-21'); // true
Carbon::isBankHoliday(Carbon::parse('First day of 2000')); // true

Carbon::getEasterMonday(2021); // '2021-04-05'
Carbon::getWhitMonday(2021); // '2021-05-24'

// Without any parameter will return date for the current year
Carbon::getAscensionThursday(); // '2020-05-21'

// Get all bank holidays for one year
array_map(function (Carbon $carbon): string {
    return $carbon->format('Y-m-d');
}, Carbon::getAllBankHolidaysForOneYear(2021));
/*
[
    '2021-01-01',
    '2021-04-05',
    '2021-05-01',
    '2021-05-08',
    '2021-05-13',
    '2021-05-24',
    '2021-07-14',
    '2021-08-15',
    '2021-11-01',
    '2021-11-11',
    '2021-12-25'
]
*/

Contributing

  1. Clone the repo and install dependencies.
docker-compose run --rm php /usr/local/bin/composer install
  1. Run Tests
docker-compose run --rm php vendor/bin/phpunit

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固