puweiyuer / php_date
Time plug-in
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/puweiyuer/php_date
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2025-12-27 11:31:42 UTC
README
php时间插件
//返回当月开始时间 ,时间戳
echo \WeiApplication\GetDate::getMonthRange('201838'),"\r\n";
//字符串
echo \WeiApplication\GetDate::getMonthRange('2018-3-8',false,false),"\r\n";
echo \WeiApplication\GetDate::getMonthRange('2018-3-8',true,false),"\r\n";
//返回今天开始时间
echo \WeiApplication\GetDate::getDay('2018-3-8',true,false),"\r\n";
echo \WeiApplication\GetDate::getDay('2018-3-8',false,false),"\r\n";
echo \WeiApplication\GetDate::getDay('2018-3-8',true),"\r\n";
echo \WeiApplication\GetDate::getDay('2018-3-8',false),"\r\n";
//返回今年开始时间
echo \WeiApplication\GetDate::getYears('2018-3-8',true,false),"\r\n";
echo \WeiApplication\GetDate::getYears('2018-3-8',false,false),"\r\n";
echo \WeiApplication\GetDate::getYears('2018-3-8',true),"\r\n";
echo \WeiApplication\GetDate::getYears('2018-3-8',false),"\r\n";
//给定2个时间返回月数
echo \WeiApplication\GetDate::twoTimeToMonth('2018-5-10','2018-4-9'),"\r\n";