php 上个月天数,php日期所在月的天数_PHP教程
php日期所在月的天數(shù)
public function daysOfMonth ($year=NULL,$month=NULL) {
if ($year===NULL) {
$year = $this->getPart('yy');
}
if ($month===NULL) {
$month = $this->getPart('mm');
}
if ($month==2)
{
if (($year % 4 == 0 && $year % 100 != 0) || $year %
400 == 0)
$result = 29;
else
$result = 28;
}
elseif ($month == 4 || $month == 6 || $month == 9 || $month
== 11)
$result = 30;
else
$result = 31;
return $result;
}
http://www.bkjia.com/PHPjc/445010.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445010.htmlTechArticlephp日期所在月的天數(shù) public function daysOfMonth ($year=NULL,$month=NULL) { if ($year===NULL) { $year = $this-getPart('yy'); } if ($month===NULL) { $month = $this-getPart('m...
本條技術(shù)文章來源于互聯(lián)網(wǎng),如果無意侵犯您的權(quán)益請點(diǎn)擊此處反饋版權(quán)投訴
本文系統(tǒng)來源:php中文網(wǎng)
總結(jié)
以上是生活随笔為你收集整理的php 上个月天数,php日期所在月的天数_PHP教程的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java async mysql,jav
- 下一篇: java major version: