PHP获取每月第一天与最后一天
2014-04-11 17:13
253 查看
<?php
function getthemonth($date)
{
$firstday = date('Y-m-01', strtotime($date));
$lastday = date('Y-m-d', strtotime("$firstday +1 month -1 day"));
return array($firstday,$lastday);
}
$today = date("Y-m-d");
$day=getthemonth($today);
?>
function getthemonth($date)
{
$firstday = date('Y-m-01', strtotime($date));
$lastday = date('Y-m-d', strtotime("$firstday +1 month -1 day"));
return array($firstday,$lastday);
}
$today = date("Y-m-d");
$day=getthemonth($today);
?>
相关文章推荐
- PHP获取每月第一天与最后一天
- PHP获取每月第一天与最后一天
- 获取每月第一天最后一天 java
- PHP获取本周第一天和最后一天示例代码
- php获取当月天数及当月第一天及最后一天、上月第一天及最后一天实现方法
- php获取当前周的第一天与最后一天
- PHP获取指定月份第一天和最后一天的方法
- php获取本周周一、周日时间,上周周一、周日时间,本月第一天,本月最后一天,上个月第一天,最后一天时间
- PHP获取某个月第一天/最后一天代码
- PHP获取指定月份的第一天开始和最后一天结束的时间戳函数
- php获取本周周一、周日时间,上周周一、周日时间,本月第一天,本月最后一天,上个月第一天,最后一天时间
- php获取本周周一、周日时间,上周周一、周日时间,本月第一天,本月最后一天,上个月第一天,最后一天时间
- PHP 日期格式化(获取上月第一天、最后一天等)
- PHP获取指定月份的第一天开始和最后一天结束的时间戳函数
- php获取当月天数及当月第一天及最后一天、上月第一天及最后一天实现方法
- SQL Server学习记录之获取每月每季度每年第一天和最后一天
- php获取本周周一、周日时间,上周周一、周日时间,本月第一天,本月最后一天,上个月第一天,最后一天时间
- php获取当月天数及当月第一天及最后一天、上月第一天及最后一天实现方法
- PHP获取本周第一天和最后一天示例代码
- OBIEE获取每月的第一天和最后一天