epiphany/date-factory

Simple, mockable, factory for creating dates

Installs: 5 574

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/epiphany/date-factory

v1.1 2021-03-02 15:19 UTC

This package is auto-updated.

Last update: 2025-09-29 02:28:05 UTC


README

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