seebaermichi/monthly-calendar 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

seebaermichi/monthly-calendar

Composer 安装命令:

composer require seebaermichi/monthly-calendar

包简介

A package which provides a monthly calendar with days and events depending on given months and events.

README 文档

README

Latest Version on Packagist Tests Total Downloads

This package returns a simple array with months, weeks and events depending on the months and events you provide.

Installation

You can install the package via composer:

composer require seebaermichi/monthly-calendar

Usage

// Will return an array with the given months and their weeks and days
// weeks will start with Monday
$monthlyCalendar = new Seebaermichi\MonthlyCalendar(['December 2021', 'January 2022']);
$calendar = $monthlyCalendar->getCalendar();

// Will return an array with the given months and their weeks and days
// weeks will start with Sunday
$monthlyCalendar = new Seebaermichi\MonthlyCalendar(['February 1989', 'March 1989'], 'Sun');
$calendar = $monthlyCalendar->getCalendar();

// Provide simple array of events and event label to get related days labeled
// First of December will have an event attribute 'birthday'
$monthlyCalendar = new Seebaermichi\MonthlyCalendar(['December 2021']);
$calendar = $monthlyCalendar->getCalendar(['2021-12-01'], 'birthday');

// Provide array of events with detailed data to get related days labeled
// 6th of March 2023 will have an events array including the given data
$monthlyCalendar = new Seebaermichi\MonthlyCalendar(['December 2021']);
$givenEvents = [
    [
        'datetime' => '2023-06-03 10:00',
        'label' => 'meeting',    
    ],
    [
        'datetime' => '2023-06-03 13:00',
        'label' => 'lunch',    
    ],
];
$calendar = $monthlyCalendar->getCalendar($givenEvents, '', 'Y-m-d H:i');

// Get only weekdays array with optional $startWith day
$weekdays = Seebaermichi\MonthlyCalendar::weekdays(); // ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
$weekdays = Seebaermichi\MonthlyCalendar::weekdays('Sun'); // ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固