library date-factory
Simple, mockable, factory for creating dates
epiphany/date-factory
Simple, mockable, factory for creating dates
- Friday, April 13, 2018
- by danmartin-epiphany
- Repository
- 1 Watchers
- 0 Stars
- 102 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 410 % Grown
Date Factory
A simple, re-usable DateTime factory that can be injected into services and easily mocked., (*1)
Usage:, (*2)
$dateTimeFactory = new DateTimeFactory();
$now = $dateTimeFactory->now();
$then = $dateTimeFactory->now("yesterday"); // accepts any input to \DateTime::__construct()
var_dump([$now,$then]);
dev-master
9999999-dev
Simple, mockable, factory for creating dates
Sources
Download
MIT
The Requires
The Development Requires
by
Dan Martin
1.0
1.0.0.0
Simple, mockable, factory for creating dates
Sources
Download
MIT
The Requires
The Development Requires
by
Dan Martin