定制 beaver/dateval 二次开发

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

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

beaver/dateval

Composer 安装命令:

composer require beaver/dateval

包简介

Library for reccuring events

README 文档

README

Build Status

Create new events, and see when they will repeat by generating results

First you need to create an event like this

$event = new Event("06 January 2014");

Example 1:
  $event->repeat("Weekly")
        ->maxRepeats(11);
        
  Event date will be set to 06 January 2014 and i will be repeated every week for limit of 11, which is 11 weeks.
  
  To generate reports on this example run:
    constructor: $report = new Report($event); // report constructor is taking Event object as argument
    usage:       $report->generateDates(from, to, pattern);
    ex:          $report->generateDates("01 March 2014", "31 March 2014");
    
    Pattern is set to default "d M Y", but you can change it any time just passing argument to function like this
    ex:         $report->generateDates("01 March 2014", "31 March 2014", "d m y");
Example 2:
  $event->repeat("Daily")
        ->until("15 March 2014");
        
  Event date is set and by generating reports with:
      $report->generateDates("01 March 2014", "31 March 2014");
  
  We will get dates from 01 March 2014 to 15 March 2014, Since event is happening every day starting from 06 January 2014 but we are generating reporst just for dates between 01 March and 31 March
Example 3:
  $event->repeat("Monday,Wednesday,Friday")
        ->maxRepeats();

  Event date is set and by generating reports with:
      $report->generateDates("01 March 2014", "31 March 2014");

  When repeat have provided argument days separated by commas that means we are searching for event that occurs just on provided days, and with maxRepeats() with not provided argument we are searching it with no limits and that will mean from 01 March to 31 March

There is some more examples and functionalities on this:

  $event->repeat("Monday,Wednesday,Friday")
        ->maxRepeats(11);

  $event->repeat("Monday,Wednesday,Friday")
        ->until("15 March 2014");

  $event->repeat(5) // event happens on every fifth day
        ->until("15 March 2014");

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固