[英]How can I extract days in each month in this case, using PHP
I have 2 dates: 我有2个约会:
$d1= 28/11/14 $ d1 = 14/11/14
$d2= 13/01/15 $ d2 = 13/01/15
So I need to print each month with the days, like this: 所以我需要每个月打印日期,如下所示:
November = 2 days 11月= 2天
December = 31 days 12月= 31天
January = 13 days 1月= 13天
any idea how can I do this? 知道我该怎么做吗? I also need to print the month and these dates have only the number of the month, so I need to convert this too. 我还需要打印月份,这些日期只有月份的数量,所以我也需要转换它。 Also including the leap years. 还包括闰年。 I'm using PHP. 我正在使用PHP。
PHP日期http://php.net/manual/zh/function.date.php因此
date('t', strtotime($englishDate));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.