PHPackages                             obokaman/dateranger - 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. obokaman/dateranger

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

obokaman/dateranger
===================

Object Oriented calendar management

1.2.0(5y ago)078MITPHPPHP &gt;=7.2CI failing

Since Sep 26Pushed 5y ago2 watchersCompare

[ Source](https://github.com/obokaman-com/DateRanger)[ Packagist](https://packagist.org/packages/obokaman/dateranger)[ Docs](https://github.com/obokaman/dateranger)[ RSS](/packages/obokaman-dateranger/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (1)Versions (13)Used By (0)

DateRanger
==========

[](#dateranger)

[![Build Status](https://camo.githubusercontent.com/35cc705173759713dee7e2c02974e3f5668935af4219d1d6b78ea1743c89fe9a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f626f6b616d616e2d636f6d2f4461746552616e6765722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/obokaman-com/DateRanger/build-status/master) [![Code Coverage](https://camo.githubusercontent.com/a8001dbb39811f571402f132017eb6e1b5530d5fad1e0a7d28e94ded769db60a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f626f6b616d616e2d636f6d2f4461746552616e6765722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/obokaman-com/DateRanger/?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/a0cf977fa206179fd0ef1b3962a2233aca51f3b1038146ac7826fb3569ee1488/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f626f6b616d616e2d636f6d2f4461746552616e6765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/obokaman-com/DateRanger/?branch=master)

DateRanger library offer an easy way to create date ranges, allowing to create your own special ranges extending `DateRange` or reuse the basic ones included in the library itself (`Year`, `Month`, `Week` or `Day`). This library was inspired by others like [Calendr](https://github.com/yohang/CalendR) by [Yohan Giarelli](http://yohan.giarel.li/) or [Period](http://period.thephpleague.com/) by [The PHP League](http://thephpleague.com/)

Installation
------------

[](#installation)

DateRanger is available on packagist, so you can easily install with [Composer](https://getcomposer.org/).

Just run the following command:

```
$ composer require obokaman/dateranger
```

or include the library in your project's composer.json:

```
    "require": {
        "php": ">=7.2",
        [...]
        "obokaman/dateranger": "^0.1",
        [...]
    },
```

Example
-------

[](#example)

```
