PHP gets the number of days in a specified month, php gets the number of days in the month_PHP tutorial

WBOY
Release: 2016-07-12 08:57:20
Original
1542 people have browsed it

PHP gets the number of days in the specified month, php gets the number of days in the month


A very practical php function that I suddenly discovered when I was writing an interface recently. Share it here:

cal_days_in_month(calender,$month,$year);

calender: calendar, constant, such as CAL_GREGORIAN (Gregorian calendar);

$month: specified month;

$year: specified year;

Return: Number of days

For example:

$monthday = cal_days_in_month(CAL_GREGORIAN,3,2016);

echo $monthday;

Output: 31

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1109845.htmlTechArticlePHP gets the number of days in a specified month, php gets the number of days in the month. I suddenly discovered a very practical php when I was writing an interface recently. Function, share it here: cal_days_in_month(calender,$...
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template