2017 © Pedro Peláez
 

library date-range

Small utility class used to create date range arrays.

image

warmans/date-range

Small utility class used to create date range arrays.

  • Thursday, October 9, 2014
  • by warmans
  • Repository
  • 1 Watchers
  • 0 Stars
  • 441 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Date Range

Build Status Scrutinizer Code Quality Code Coverage, (*1)

Relative

Thin wrapper around DateTime classes to simplify generating date ranges relative to the current date., (*2)

Basic Usage

Create a range instance specifying its options:, (*3)

$range = new \DateRange\Relative(array('length'=>'60 DAY', 'interval'=>'P1D');

Export the specified range as an array:, (*4)

var_dump($range->getRange());

It will look something like this:, (*5)

array(
    '01-01-2014' => array('raw' => \DateTime, 'formatted' => '01-01-2014')
    '02-01-2014' => array('raw' => \DateTime, 'formatted' => '02-01-2014')
    //etc...
)

Options

Option Example Description
length 30 DAYS DateTime format relative date string
modify -1 DAY Offset the date range by this DateTime format relative date string
interval P1D DateInterval format interval
date_format Y-m-d date() style date format for result

The Versions

09/10 2014

dev-master

9999999-dev

Small utility class used to create date range arrays.

  Sources   Download

The Development Requires

by Avatar warmans

09/10 2014

0.0.3

0.0.3.0

Small utility class used to create date range arrays.

  Sources   Download

The Development Requires

by Avatar warmans

03/09 2014

0.0.2

0.0.2.0

Small utility class used to create date range arrays.

  Sources   Download

The Development Requires

by Avatar warmans

02/09 2014

0.0.1

0.0.1.0

Small utility class used to create date range arrays.

  Sources   Download

The Development Requires

by Avatar warmans