定制 tomasfejfar/datetime-strict 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tomasfejfar/datetime-strict

Composer 安装命令:

composer require tomasfejfar/datetime-strict

包简介

Simple DateTime wrapper allowing strict date and time validation

README 文档

README

Build Status Coverage Status Total Downloads Latest Version on Packagist Average time to resolve an issue Percentage of issues still open

Simple wrapper around DateTime to allow strict datetime validation

Install via Composer

composer require tomasfejfar/datetime-strict

Usage

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.

Changelog

Changes can be found in each tag's annotation

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!

统计信息

  • 总下载量: 103
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固