2017 © Pedro Peláez
 

library datetime

DateTime helpers

image

jaroslavlibal/datetime

DateTime helpers

  • Saturday, July 8, 2017
  • by jaroslavlibal
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 33 % Grown

The README.md

DateTime

Installation

Install package jaroslavlibal/datetime with Composer and register the parts you need as the services., (*1)

composer require jaroslavlibal/datetime

Factory

Retrieve the DateTime and DateTimeImmutable objects from the mockable and testable factory instead of direct new \DateTime() creation., (*2)

Usage

class Foo
{

   use JaroslavLibal\DateTime\Factory\DateTimeFactory;  
   use JaroslavLibal\DateTime\Factory\DateTimeFactory;  

   private DateTimeFactory;
   private DateTimeImmutableFactory;

   public function __construct(DateTimeFactory $dateTimeFactory, DateTimeImmutableFactory $dateTimeImmutableFactory)

   private function bar() {
      $dateTimeFactory->create();
      $dateTimeImmutableFactory->create();
   }
}

The Versions

08/07 2017

dev-master

9999999-dev

DateTime helpers

  Sources   Download

MIT

The Requires

  • php ^7.0

 

08/07 2017

0.1

0.1.0.0

DateTime helpers

  Sources   Download

MIT

The Requires

  • php ^7.0