joshtronic/randomdate
Composer 安装命令:
composer require joshtronic/randomdate
包简介
Random time/date generator fully compatible with PHP's date function.
关键字:
README 文档
README
Random time/date generator fully compatible with PHP's date function.
Compatible with PHP 5.3+.
Installation
composer require joshtronic/randomdate
Usage
<?php
$rd = new joshtronic\RandomDate();
// Between the Unix Epoch and now
$rd->date(/* format string, default = 'c' */);
// Between January 1st, 1900 and now
$rd->min('1900-01-01')->date('Y-m-d');
// Between the Unix Epoch and next month
$rd->max('next month')->date('r');
// Between yesterday and tomorrow (at midnight)
$rd->between('yesterday', 'midnight tomorrow')->date('r');
// Reset minimum and maximum to defaults
$rd->reset->date();
Compatibility with PHP functions
By design, this library aims to keep things simple by using the familiar
format string provided by PHP's existing date as well as the
extremely powerful strtotime for setting the range of dates
used for generation.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-13