亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

php獲取當(dāng)月最后一天函數(shù)分享

 更新時(shí)間:2015年02月02日 14:24:15   投稿:hebedich  
這篇文章主要介紹了php獲取當(dāng)月最后一天函數(shù)分享,需要的朋友可以參考下

非常簡(jiǎn)單實(shí)用的函數(shù),這里就不多廢話了,直接奉上代碼

復(fù)制代碼 代碼如下:

/**
     *    日期-獲取當(dāng)月最后一天
     *  @return int
     */
    public function get_lastday() {
        if($this->month==2) {
            $lastday = $this->is_leapyear($this->year) ? 29 : 28;
        } elseif($this->month==4 || $this->month==6 || $this->month==9 || $this->month==11) {
            $lastday = 30;
        } else {
            $lastday = 31;
        }
        return $lastday;
    }
    /**
     *    日期-是否是閏年
     *  @return int
     */
    public function is_leapyear($year) {
        return date('L', $year);
    }

以上就是本代碼的全部?jī)?nèi)容,希望小伙伴們喜歡。

相關(guān)文章

最新評(píng)論