salamek / php-daterange
Php date range implementation, usualy used in PgSQL database
Installs: 14 153
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.0
This package is auto-updated.
Last update: 2024-11-13 05:18:09 UTC
README
Php date range implementation, usualy used in PgSQL database
<?php $dateRange = new Salamek\DateRange(\DateTimeInterface $startDate, \DateTimeInterface $endDate); $dateRange->getStartDate(); //$startDate $dateRange->getEndDate(); //$endDate $datePeriod = $dateRange->datePeriod(\DateInterval $dateInterval); // same as \DatePeriod(\DateTimeInterface $startDate, \DateInterval $dateInterval, \DateTimeInterface $endDate)