<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

        Javascript下判斷是否為閏年的Datetime包_時間日期

        來源:懂視網(wǎng) 責(zé)編:小采 時間:2020-11-27 20:55:28
        文檔

        Javascript下判斷是否為閏年的Datetime包_時間日期

        Javascript下判斷是否為閏年的Datetime包_時間日期:來看看源碼: 代碼如下: /** * jscript.datetime package * This package contains utility functions for working with dates and times. */ /*命名空間*/ if (typeof jscript == 'undefined') { jscri
        推薦度:
        導(dǎo)讀Javascript下判斷是否為閏年的Datetime包_時間日期:來看看源碼: 代碼如下: /** * jscript.datetime package * This package contains utility functions for working with dates and times. */ /*命名空間*/ if (typeof jscript == 'undefined') { jscri

        來看看源碼:
        代碼如下:
        /**
        * jscript.datetime package
        * This package contains utility functions for working with dates and times.
        */
        /*命名空間*/
        if (typeof jscript == 'undefined') {
        jscript = function() { }
        }

        jscript.datetime = function() { }

        /**
        * This function will return the number of days in a given month and year,
        * taking leap years into account.(這個函數(shù)返回所給某年、某月的天數(shù),并且考慮了閏年的情況)
        *
        * @param inMonth The month, where January = 1 and December = 12.
        * @param inYear The year to check the month in.
        * @return The number of days in the specified month and year.
        */
        jscript.datetime.getNumberDaysInMonth = function(inMonth, inYear) {

        inMonth = inMonth - 1;
        var leap_year = this.isLeapYear(inYear);
        if (leap_year) {
        leap_year = 1;
        } else {
        leap_year = 0;
        }
        /*4, 6, 9, 11 月為 30 天,注意上面的 inMonth = inMonth - 1*/
        if (inMonth == 3 || inMonth == 5 || inMonth == 8 || inMonth == 10) {
        return 30;
        } else if (inMonth == 1) {/*2 月為 28 或者 29 天,視是否為閏年而定*/
        return 28 + leap_year;
        } else {/*其它月則為 31 天*/
        return 31;
        }

        } // End getNumberDaysInMonth().


        /**
        * This function will determine if a given year is a leap year.
        *(這個函數(shù)用來確定是否為閏年)
        * @param inYear The year to check.
        * @return True if inYear is a leap year, false if not.
        */
        jscript.datetime.isLeapYear = function(inYear) {

        if ((inYear % 4 == 0 && !(inYear % 100 == 0)) || inYear % 400 == 0) {
        return true;
        } else {
        return false;
        }

        } // End isLeapYear().

        聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        Javascript下判斷是否為閏年的Datetime包_時間日期

        Javascript下判斷是否為閏年的Datetime包_時間日期:來看看源碼: 代碼如下: /** * jscript.datetime package * This package contains utility functions for working with dates and times. */ /*命名空間*/ if (typeof jscript == 'undefined') { jscri
        推薦度:
        標(biāo)簽: 時間 判斷 js
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 免费无遮挡无码永久在线观看视频| 青柠影视在线观看免费| 四虎在线免费视频| 亚洲视屏在线观看| 日本免费大黄在线观看| 亚洲一区二区中文| 91精品国产免费久久国语麻豆| 少妇中文字幕乱码亚洲影视| 午夜精品射精入后重之免费观看 | 在线免费观看伊人三级电影| 在线精品亚洲一区二区小说| a级在线观看免费| 在线观看亚洲人成网站| 韩国免费一级成人毛片| 亚洲中文字幕AV每天更新| 免费国产一级特黄久久| 国产精品99爱免费视频| 久久久久久亚洲精品中文字幕| 免费A级毛片av无码| 亚洲娇小性xxxx| 四虎免费久久影院| 中国一级特黄的片子免费| 亚洲爆乳无码一区二区三区| 免费看男女下面日出水来| 亚洲人成人无码.www石榴 | 久久综合国产乱子伦精品免费| 亚洲综合激情六月婷婷在线观看| 好爽又高潮了毛片免费下载| 免费国产草莓视频在线观看黄| 亚洲国产精品无码久久久秋霞2| 无码国产精品久久一区免费| 黄网站色成年片大免费高清| 内射干少妇亚洲69XXX| 国产免费131美女视频| 大地资源在线资源免费观看| 亚洲日本久久一区二区va| 亚洲成a人片在线观看国产| 日韩午夜理论免费TV影院| 色九月亚洲综合网| 久久国产亚洲高清观看| 国产一区二区三区在线观看免费|