PHP 获取指定月对应天数
2013-04-16 11:47
218 查看
$firstday = mktime(0,0,0,$month,1,$year); //取所给年月的第一天的UNIX时间戳 $days = date('t',$firstday); //返回指定月份的天数
$days = cal_days_in_month(CAL_GREGORIAN, 4, 2013);//返回2003-02的天数
$days = date('t', strtotime($year . '-' . $month . '-01'));//返回天数
$ndays = date("t"); //return the number of days for this month and this year date("j",mktime(0,0,0,$month+1,0,$year));
相关文章推荐
- java获取当月天数,指定年月的天数,指定日期获取对应星期
- java获取当月天数,指定年月的天数,指定日期获取对应星期
- php 获取指定月份的天数
- 获取指定年月的天数(PHP代码函数)
- java获取当月天数,指定年月的天数,指定日期获取对应星期
- java获取当月天数,指定年月的天数,指定日期获取对应星期
- java获取当月天数,指定年月的天数,指定日期获取对应星期(转)
- php中,获取指定日期的当月天数
- java获取当月天数,指定年月的天数,指定日期获取对应星期
- java获取当月天数,指定年月的天数,指定日期获取对应星期
- java获取当月天数,指定年月的天数,指定日期获取对应星期
- java获取当月天数,指定年月的天数,指定日期获取对应星期
- PHP获取指定月份的第一天开始和最后一天结束的时间戳函数
- php获取指定日期所在星期的开始时间与结束时间
- php获取当月天数及当月第一天及最后一天、上月第一天及最后一天实现方法
- php 获取页面中的指定内容类
- php获取指定日期之间的各个周和月的起止时间
- 获取php数组的键名和对应的值
- php 获取页面中指定内容的实现类
- JAVA获取指定月份的天数