PHPackages                             php-value-object/date-time-range - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-value-object/date-time-range

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

php-value-object/date-time-range
================================

DateTimeRange value object

v0.1(8y ago)23.5kMITPHPPHP &gt;=7.0

Since Dec 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/PHPValueObject/DateTimeRange)[ Packagist](https://packagist.org/packages/php-value-object/date-time-range)[ RSS](/packages/php-value-object-date-time-range/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

DateTimeRange Value Object
==========================

[](#datetimerange-value-object)

[![Build Status](https://camo.githubusercontent.com/26d7d44370559a356ad6e1325d20fcc83cf35250d1e359a2804a86223e60bed1/68747470733a2f2f7472617669732d63692e6f72672f50485056616c75654f626a6563742f4461746554696d6552616e67652e737667)](https://travis-ci.org/PHPValueObject/DateTimeRange)[![Latest Stable Version](https://camo.githubusercontent.com/90702da205862002a3e79fe576e1c6b3aa5ef1d65ea433c653f8712cb600f4a5/68747470733a2f2f706f7365722e707567782e6f72672f7068702d76616c75652d6f626a6563742f646174652d74696d652d72616e67652f762f737461626c65)](https://packagist.org/packages/php-value-object/date-time-range)[![License](https://camo.githubusercontent.com/e9c3f7edf3ccf9108b2a866b36edc8cdfd3c8484be435dc7202ae26c5de71af2/68747470733a2f2f706f7365722e707567782e6f72672f7068702d76616c75652d6f626a6563742f646174652d74696d652d72616e67652f6c6963656e7365)](https://packagist.org/packages/php-value-object/date-time-range)[![PHPStan](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://packagist.org/packages/php-value-object/date-time-range)

This repository provides DateTiemRange ValueObject implementation for PHP that is easy to use and easily allow your classes to depend on `DateTimeRange` object instead of having both `$startDateTime` and `$endDateTime`.

Install
-------

[](#install)

You can install this package via composer

`composer require php-value-object/date-time-range`

Example
-------

[](#example)

```
$dateTimeRange = new DateTimeRange(
    new \DateTimeImmutable('2015-01-01'),
    new \DateTimeImmutable('2015-03-25')
);
```

Licence
-------

[](#licence)

MIT

Contributing
------------

[](#contributing)

Any contributions are welcome

Building &amp; Development
--------------------------

[](#building--development)

The easiest way how to develop is to `git clone` and run `make`

```
git clone git@github.com:PHPValueObject/DateTimeRange.git date_time_range
cd date_time_range
make

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3083d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/743421?v=4)[Martin Hlavac](/maintainers/mhlavac)[@mhlavac](https://github.com/mhlavac)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/php-value-object-date-time-range/health.svg)

```
[![Health](https://phpackages.com/badges/php-value-object-date-time-range/health.svg)](https://phpackages.com/packages/php-value-object-date-time-range)
```

###  Alternatives

[bcc/auto-mapper-bundle

An object to object mapper bundle for Symfony2

63442.7k](/packages/bcc-auto-mapper-bundle)[fgits/carbon-german-holidays

Carbon extension with support for German Holidays

1252.4k](/packages/fgits-carbon-german-holidays)

PHPackages © 2026

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