apie/dateformat-to-regex
最新稳定版本:1.0.0-RC2
Composer 安装命令:
composer require apie/dateformat-to-regex
包简介
Composer package of the apie library: dateformat to regex
README 文档
README
dateformat-to-regex
This package is part of the Apie library. The code is maintained in a monorepo, so PR's need to be sent to the monorepo
Documentation
This package converts PHP date format strings into regular expressions. Right now it will create the 'simple' regular expression. So it will validate 30 february as a valid date.
Usage
<?php use Apie\DateformatToRegex\DateFormatToRegex; $dateFormat = DateTime::ATOM; $regularExpression = DateFormatToRegex::formatToRegex($dateFormat); $dateString = '2020-01-28T16:22:37-07:00'; // echos 1 as the regular expression matches the date string. var_dump(preg_match($regularExpression, $dateString));
统计信息
- 总下载量: 7.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-20