php-value-object/date-time-range

DateTimeRange value object

v0.1 2017-12-08 12:43 UTC

This package is not auto-updated.

Last update: 2024-12-19 01:48:48 UTC


README

Build Status Latest Stable Version License PHPStan

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

You can install this package via composer

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

Example

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

Licence

MIT

Contributing

Any contributions are welcome

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