2017 © Pedro Peláez
 

library date-factory

Simple, mockable, factory for creating dates

image

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

The README.md

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]);

The Versions

13/04 2018

dev-master

9999999-dev

Simple, mockable, factory for creating dates

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Dan Martin

13/04 2018

1.0

1.0.0.0

Simple, mockable, factory for creating dates

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Dan Martin