puweiyuer / php_date
Time plug-in
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2024-10-05 05:47:38 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";