php根据年月获取季度的方法
这篇文章主要介绍了php根据年月获取季度的方法,需要的朋友可以参考下
代码如下:
<?php
function getQuarterByMonth($date){
$month = substr($date,-2);
$Q = ceil($month/3);
return $Q;
}
?>
- 上一篇:php过滤敏感词的示例
- 下一篇:PHP调用VC编写的COM组件实例
精彩图集
精彩文章
@CopyRight 2002-2008, 1SOHU.COM, Inc. All Rights Reserved QQ:1010969229