fr3on/php-recur 问题修复 & 功能扩展

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

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

fr3on/php-recur

最新稳定版本:0.0.1

Composer 安装命令:

composer require fr3on/php-recur

包简介

A modern PHP 8.4+ library for recurring date/time rules (iCal RRULE).

README 文档

README

A modern, high-performance PHP 8.4+ library for recurring date/time rules (iCal RRULE).

CI PHP Version License

Features

  • PHP 8.4+ Optimized: Leverages modern features like readonly classes, enums, and Generators.
  • Lazy Iteration: Processes occurrences one-by-one, making it safe for infinite rules.
  • Timezone Aware: Correctly handles DST transitions across all timezones.
  • RFC 5545 Compliant: Implements the iCal RRULE specification including complex expansion logic.
  • Fluent Builder: Developer-friendly API for common recurrence patterns.

Installation

composer require fr3on/php-recur

Quick Start

Basic Daily Recurrence

use Fr3on\Recur\Recur;

$occurrences = Recur::daily()
    ->starting(new DateTimeImmutable('2026-04-13'))
    ->count(10)
    ->take(10);

Complex Monthly Rule

use Fr3on\Recur\Recur;
use Fr3on\Recur\Rule\Weekday;

// Second Monday of every month
$builder = Recur::monthly()
    ->on(Weekday::MO->nth(2))
    ->take(12);

Parsing RRULE Strings

$builder = Recur::fromRrule("FREQ=WEEKLY;BYDAY=MO,WE,FR;COUNT=10");
foreach ($builder->occurrences() as $date) {
    echo $date->format('Y-m-d');
}

Development

Running Tests

composer test

Static Analysis

composer analyse

License

MIT License. See LICENSE for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固