markwilson/date-range

This package is abandoned and no longer maintained. No replacement package was suggested.

Date ranges

dev-master 2015-05-14 09:54 UTC

This package is not auto-updated.

Last update: 2021-01-23 09:23:47 UTC


README

## Usage

<?php

use MarkWilson\DateRange\DateRange;
use MarkWilson\DateRange\DateRangeGroup;

$dateRange = DateRange::createFromStrings('today', 'P1W');
$dateRange->covers(new DateTime('tomorrow'));  // true
$dateRange->covers(new DateTime('yesterday')); // false

$dateRangeGroup = new DateRangeGroup($dateRange); // or ($dateRange1, $dateRange2, ...)
$dateRangeGroup->covers(new DateTime('tomorrow'));  // true
$dateRangeGroup->covers(new DateTime('yesterday')); // false