Home>Article>Backend Development> How to use php cal_days_in_month function

How to use php cal_days_in_month function

藏色散人
藏色散人 Original
2019-05-26 15:24:32 3339browse

php cal_days_in_month function is used to return the number of days in a month for the specified year and calendar. Its syntax is cal_days_in_month(calendar,month,year).

How to use php cal_days_in_month function

php How to use cal_days_in_month function?

Definition and usage

cal_days_in_month() function returns the number of days in a month for the specified year and calendar.

Syntax

cal_days_in_month(calendar,month,year);

Parameters

calendar Required. Specifies the calendar to be used. See PHP Calendar constants.

month Required. Specifies the month in the selected calendar.

year Required. Specifies the year in the selected calendar.

Return Value: Returns the number of days in the selected month for the given year and calendar.

PHP Version: 4.1

Example

Get the number of days in a month for the specified year and calendar:

The above is the detailed content of How to use php cal_days_in_month function. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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