2017 © Pedro Peláez
 

library datetime-strict

Simple DateTime wrapper allowing strict date and time validation

image

tomasfejfar/datetime-strict

Simple DateTime wrapper allowing strict date and time validation

  • Tuesday, December 6, 2016
  • by tomasfejfar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 93 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

datetime-strict

![Build Status][ico-travis] [Coverage Status][link-coveralls] ![Total Downloads][ico-downloads] Latest Version on Packagist Average time to resolve an issue Percentage of issues still open, (*1)

Simple wrapper around DateTime to allow strict datetime validation, (*2)

Install via Composer

``` bash composer require tomasfejfar/datetime-strict, (*3)


## Usage ``` php use TomasFejfar\DateTime\DateTimeStrict; use TomasFejfar\DateTime\StrictFormatException; try { $date = DateTimeStrict::createFromFormat('Y-m-d H:i:s', '2001-33-05 13:35:08'); } catch (StrictFormatException $e) { $warnings = $e->getWarnings(); $errors = $e->getErrors(); }

Usage for immutable variant is the same, just use DateTimeImmutableStrict::createFromFormat() instead., (*4)

Changelog

Changes can be found in each tag's annotation, (*5)

Rules for contributing

  • 1 PR per feature
  • PR with tests are more likely to be merged
  • tests and coding standard must pass
composer test
composer phpcs

Happy coding!, (*6)

The Versions

06/12 2016

dev-master

9999999-dev https://github.com/tomasfejfar/datetime-strict

Simple DateTime wrapper allowing strict date and time validation

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

validation datetime

06/12 2016

0.2

0.2.0.0 https://github.com/tomasfejfar/datetime-strict

Simple DateTime wrapper allowing strict date and time validation

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

validation datetime

11/10 2016

0.1

0.1.0.0 https://github.com/tomasfejfar/datetime-strict

Simple DateTime wrapper allowing strict date and time validation

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

validation datetime