PHPackages                             thinkalot/miti - 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. thinkalot/miti

ActiveLibrary

thinkalot/miti
==============

Miti is a PHP library for datetime &amp; datetime range comparision

05PHP

Since Feb 24Pushed 11y ago1 watchersCompare

[ Source](https://github.com/thinksalot/miti)[ Packagist](https://packagist.org/packages/thinkalot/miti)[ RSS](/packages/thinkalot-miti/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Miti
====

[](#miti)

Miti is a simple PHP library for datetime &amp; datetime range comparisons.

[![Build Status](https://camo.githubusercontent.com/e7f41eb108cba2df65da21e8ddcb230558fe7504554309b4690efde92db56086/68747470733a2f2f7472617669732d63692e6f72672f7468696e6b73616c6f742f6d6974692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/thinksalot/miti)

Loading
=======

[](#loading)

Either using `require` in your app:

```
require_once( '/path/to/Miti/src/autoload.php' );
```

or using [composer](https://getcomposer.org/):

```
  "require": {
      "thinksalot/miti" : "*"
  }
```

Usage
=====

[](#usage)

### Between

[](#between)

Checks if a date object lies between given dates

```
$dt = new Miti\DateTime( '2015-02-22' );
$dt->between( '2015-01-01', '2015-03-01' );
```

### Contains

[](#contains)

Checks if a range contains a date

```
$dr = new Miti\DateTimeRange( '2015-01-01', '2015-03-01' );
$dr->contains( '2015-02-22' );
```

### Equals

[](#equals)

Checks if two datetime ranges are the same

```
$firstRange  = new Miti\DateTimeRange( '2015-01-01', '2015-03-01' );
$secondRange = new Miti\DateTimeRange( '2015-01-01', '2015-03-01' );
$firstRange->equals( $secondRange );
```

### Overlaps

[](#overlaps)

Checks if two datetime ranges are overlapping

```
$firstRange  = new Miti\DateTimeRange( '2015-01-01', '2015-03-01' );
$secondRange = new Miti\DateTimeRange( '2015-02-22', '2015-03-01' );
$firstRange->overlaps( $secondRange );
```

### Encloses

[](#encloses)

Checks if a datetime range encloses another

```
$firstRange  = new Miti\DateTimeRange( '2015-01-01', '2015-06-01' );
$secondRange = new Miti\DateTimeRange( '2015-03-22', '2015-04-01' );
$firstRange->encloses( $secondRange );
```

### Consecutive to

[](#consecutive-to)

Checks is a given range immediately follows another range

```
$firstRange  = new Miti\DateTimeRange( '2015-01-01', '2015-06-01' );
$secondRange = new Miti\DateTimeRange( '2015-06-02', '2015-12-01' );
$secondRange->consecutiveTo( $firstRange );
```

License
=======

[](#license)

Please check the LICENSE file

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d1825a46d64299e2e852e3685cf2cec7685fa309ac17f49feceff7d681928deb?d=identicon)[thinksalot](/maintainers/thinksalot)

---

Top Contributors

[![thinksalot](https://avatars.githubusercontent.com/u/568707?v=4)](https://github.com/thinksalot "thinksalot (16 commits)")

### Embed Badge

![Health badge](/badges/thinkalot-miti/health.svg)

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

PHPackages © 2026

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