PHPackages                             icomefromthenet/schedule - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. icomefromthenet/schedule

ActiveLibrary

icomefromthenet/schedule
========================

Helper to manage schedule

v1.0.0(12y ago)018MITPHP

Since Aug 20Pushed 12y ago1 watchersCompare

[ Source](https://github.com/icomefromthenet/ScheduleHelper)[ Packagist](https://packagist.org/packages/icomefromthenet/schedule)[ RSS](/packages/icomefromthenet-schedule/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

ScheduleHelper [![Build Status](https://camo.githubusercontent.com/39cad338fdb0f0dd67efe04eb72bf5c8aa6eaea8b73be99bf08ee2df85e2c3ac/68747470733a2f2f7472617669732d63692e6f72672f69636f6d6566726f6d7468656e65742f5363686564756c6548656c7065722e706e673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/39cad338fdb0f0dd67efe04eb72bf5c8aa6eaea8b73be99bf08ee2df85e2c3ac/68747470733a2f2f7472617669732d63692e6f72672f69636f6d6566726f6d7468656e65742f5363686564756c6548656c7065722e706e673f6272616e63683d6d6173746572)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#schedulehelper-)

When working with dates and schedules, php has 2 built in helpers DateInteral and DatePeriod using these two classes will get you most of the way. There are a few things to keep in mind.

1. DatePeriod is not by default and Iterator it use Traversable interface and does not have methods like next,current,rewind.
2. You will need to match your period to DSL used in DateInterval.
3. Can't use DatePeriod to represent non liner date intervals, e.g weekdays only.
4. Still need to design a method to map between a setting and a DateInterval if you want to create it later.
5. If want to start in middle you need to skip ahead in your own code to given offset.

I wrote this helper to address these shortcomings, I use a builder that will accept a string name and returns an Iterator, during construction you may ask the iterator to skip ahead and I have implement the following common periods.

1. Yearly
2. Weekly
3. Monthly
4. Fortnightly
5. Weekday
6. BiMonthly
7. Quarterly

Examples
--------

[](#examples)

```
use DateTime;
use IComeFromTheNet\Schedule\ScheduleBuilder;

$start = new DateTime();
$reoccurance = 12;

$builder = new ScheduleBuilder();

return $builder->daily()
        ->start($start)
        ->limit($reoccurance)
        ->skipStart()
        ->build();

```

This create a daily schedule that limit to 12 occursions as where skip the first period. Important to note that there will be 13 occurances, if the start is not skipped. This is a feature of PHP DatePeriod when setting a limit using an integer the number is ***re-occurance after the start***. Total occurances is start + re-occurances (limit).

```
use DateTime;
use IComeFromTheNet\Schedule\ScheduleBuilder;

$start = new DateTime();
$reoccurance = 12;

$builder = new ScheduleBuilder();

return $builder->monthly()
        ->start($start)
        ->limit($reoccurance)
        ->offset(4)
        ->build();
```

This will return a monthly schedule 4 occurances in. If the starting month was August the first starting value at december. Using a LimitIterator to restrict the result set.

```
use DateTime;
use IComeFromTheNet\Schedule\ScheduleBuilder;

$start = new DateTime();
$reoccurance = 12;

$builder = new ScheduleBuilder();

return $builder->create('monthly')
        ->start($start)
        ->limit($reoccurance)
        ->build();
```

This will return a monthly schedule, the rule is defined using a string and not direct method call.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4648d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/746782?v=4)[Lewis Dyer](/maintainers/icomefromthenet)[@icomefromthenet](https://github.com/icomefromthenet)

---

Top Contributors

[![icomefromthenet](https://avatars.githubusercontent.com/u/746782?v=4)](https://github.com/icomefromthenet "icomefromthenet (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/icomefromthenet-schedule/health.svg)

```
[![Health](https://phpackages.com/badges/icomefromthenet-schedule/health.svg)](https://phpackages.com/packages/icomefromthenet-schedule)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
