Date::ampm()方法会按你给的小时返回一个AM或者PM。只能用在24小时。
用法
echo Date::ampm(8);
将返回
AM
echo Date::ampm(11);
echo Date::ampm(12);
PM
echo Date::ampm(18);