Skip to content

epiphanysearch/date-factory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Date Factory

A simple, re-usable DateTime factory that can be injected into services and easily mocked.

Usage:

$dateTimeFactory = new DateTimeFactory();
$now = $dateTimeFactory->now();
$then = $dateTimeFactory->now("yesterday");	// accepts any input to \DateTime::__construct()

var_dump([$now,$then]);

About

Factory for creating DateTime objects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages