如何找到开始日期和时间任何给定年份的结束日期&月 [英] How to find a start date & end date of any given year & month

查看:58
本文介绍了如何找到开始日期和时间任何给定年份的结束日期&月的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在php中发现开始日期&的问题月份的结束日期&年,我何时知道年月?

I have problem in php find start date & end date of month & year , when i know the year and month ?

例如:

input - > year = 2011 , month = 08
output -> start date = 01 , end date = 31

推荐答案

echo date('m-01-Y 00:00:00',strtotime('this month')) . '<br/>';
echo date('m-t-Y 12:59:59',strtotime('this month')) . '<br/>';

这篇关于如何找到开始日期和时间任何给定年份的结束日期&amp;月的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆