亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gregoriancalendar.java

?? java源代碼 請看看啊 提點寶貴的意見
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
        } else {            // We handle most fields here.  The algorithm is to add a computed amount            // of millis to the current millis.  The only wrinkle is with DST -- if            // the result of the add operation is to move from DST to Standard, or vice            // versa, we need to adjust by an hour forward or back, respectively.            // Otherwise you get weird effects in which the hour seems to shift when            // you add to the DAY_OF_MONTH field, for instance.            // We only adjust the DST for fields larger than an hour.  For fields            // smaller than an hour, we cannot adjust for DST without causing problems.            // for instance, if you add one hour to April 5, 1998, 1:00 AM, in PST,            // the time becomes "2:00 AM PDT" (an illegal value), but then the adjustment            // sees the change and compensates by subtracting an hour.  As a result the            // time doesn't advance at all.            long delta = amount;            boolean adjustDST = true;            switch (field) {            case WEEK_OF_YEAR:            case WEEK_OF_MONTH:            case DAY_OF_WEEK_IN_MONTH:                delta *= 7 * 24 * 60 * 60 * 1000; // 7 days                break;            case AM_PM:                delta *= 12 * 60 * 60 * 1000; // 12 hrs                break;            case DATE: // synonym of DAY_OF_MONTH            case DAY_OF_YEAR:            case DAY_OF_WEEK:                delta *= 24 * 60 * 60 * 1000; // 1 day                break;            case HOUR_OF_DAY:            case HOUR:                delta *= 60 * 60 * 1000; // 1 hour                adjustDST = false;                break;            case MINUTE:                delta *= 60 * 1000; // 1 minute                adjustDST = false;                break;            case SECOND:                delta *= 1000; // 1 second                adjustDST = false;                break;            case MILLISECOND:                adjustDST = false;                break;            case ZONE_OFFSET:            case DST_OFFSET:            default:                throw new IllegalArgumentException();            }            // Save the current DST state.            long dst = 0;            if (adjustDST) {		dst = internalGet(DST_OFFSET);	    }            setTimeInMillis(time + delta); // Automatically computes fields if necessary            if (adjustDST) {                // Now do the DST adjustment alluded to above.                // Only call setTimeInMillis if necessary, because it's an expensive call.                dst -= internalGet(DST_OFFSET);                if (dst != 0) {		    setTimeInMillis(time + dst);		}            }        }    }    /**     * Adds or subtracts (up/down) a single unit of time on the given time     * field without changing larger fields.      * <p>     * <em>Example</em>: Consider a <code>GregorianCalendar</code>     * originally set to December 31, 1999. Calling <code>roll(Calendar.MONTH, true)</code>     * sets the calendar to January 31, 1999.  The <code>Year</code> field is unchanged     * because it is a larger field than <code>MONTH</code>.</p>     * @param up indicates if the value of the specified time field is to be     * rolled up or rolled down. Use true if rolling up, false otherwise.     * @exception IllegalArgumentException if an unknown field value is given.     * @see GregorianCalendar#add     * @see GregorianCalendar#set     */    public void roll(int field, boolean up) {        roll(field, up ? +1 : -1);    }    /**     * Add to field a signed amount without changing larger fields.     * A negative roll amount means to subtract from field without changing      * larger fields.     * <p>     * <em>Example</em>: Consider a <code>GregorianCalendar</code>     * originally set to August 31, 1999. Calling <code>roll(Calendar.MONTH,     * 8)</code> sets the calendar to April 30, <strong>1999</strong>. Using a     * <code>GregorianCalendar</code>, the <code>DAY_OF_MONTH</code> field cannot     * be 31 in the month April. <code>DAY_OF_MONTH</code> is set to the closest possible     * value, 30. The <code>YEAR</code> field maintains the value of 1999 because it     * is a larger field than <code>MONTH</code>.     * <p>     * <em>Example</em>: Consider a <code>GregorianCalendar</code>     * originally set to Sunday June 6, 1999. Calling     * <code>roll(Calendar.WEEK_OF_MONTH, -1)</code> sets the calendar to     * Tuesday June 1, 1999, whereas calling     * <code>add(Calendar.WEEK_OF_MONTH, -1)</code> sets the calendar to     * Sunday May 30, 1999. This is because the roll rule imposes an     * additional constraint: The <code>MONTH</code> must not change when the     * <code>WEEK_OF_MONTH</code> is rolled. Taken together with add rule 1,     * the resultant date must be between Tuesday June 1 and Saturday June     * 5. According to add rule 2, the <code>DAY_OF_WEEK</code>, an invariant     * when changing the <code>WEEK_OF_MONTH</code>, is set to Tuesday, the     * closest possible value to Sunday (where Sunday is the first day of the     * week).</p>     * @param field the time field.     * @param amount the signed amount to add to <code>field</code>.     * @since 1.2     * @see GregorianCalendar#add     * @see GregorianCalendar#set     */    public void roll(int field, int amount) {        if (amount == 0) {	    return; // Nothing to do	}        int min = 0, max = 0, gap;        if (field >= 0 && field < FIELD_COUNT) {            complete();            min = getMinimum(field);            max = getMaximum(field);        }        switch (field) {        case ERA:        case YEAR:        case AM_PM:        case MINUTE:        case SECOND:        case MILLISECOND:            // These fields are handled simply, since they have fixed minima            // and maxima.  The field DAY_OF_MONTH is almost as simple.  Other            // fields are complicated, since the range within they must roll            // varies depending on the date.            break;        case HOUR:        case HOUR_OF_DAY:            // Rolling the hour is difficult on the ONSET and CEASE days of            // daylight savings.  For example, if the change occurs at            // 2 AM, we have the following progression:            // ONSET: 12 Std -> 1 Std -> 3 Dst -> 4 Dst            // CEASE: 12 Dst -> 1 Dst -> 1 Std -> 2 Std            // To get around this problem we don't use fields; we manipulate            // the time in millis directly.            {                // Assume min == 0 in calculations below                Date start = getTime();                int oldHour = internalGet(field);                int newHour = (oldHour + amount) % (max + 1);                if (newHour < 0) {                    newHour += max + 1;                }                setTime(new Date(start.getTime() + ONE_HOUR * (newHour - oldHour)));                return;            }        case MONTH:            // Rolling the month involves both pinning the final value to [0, 11]            // and adjusting the DAY_OF_MONTH if necessary.  We only adjust the            // DAY_OF_MONTH if, after updating the MONTH field, it is illegal.            // E.g., <jan31>.roll(MONTH, 1) -> <feb28> or <feb29>.            {                int mon = (internalGet(MONTH) + amount) % 12;                if (mon < 0) {		    mon += 12;		}                set(MONTH, mon);                                // Keep the day of month in range.  We don't want to spill over                // into the next month; e.g., we don't want jan31 + 1 mo -> feb31 ->                // mar3.                // NOTE: We could optimize this later by checking for dom <= 28                // first.  Do this if there appears to be a need. [LIU]                int monthLen = monthLength(mon);                int dom = internalGet(DAY_OF_MONTH);                if (dom > monthLen) {		    set(DAY_OF_MONTH, monthLen);		}                return;            }        case WEEK_OF_YEAR:            {                // Unlike WEEK_OF_MONTH, WEEK_OF_YEAR never shifts the day of the                // week.  Also, rolling the week of the year can have seemingly                // strange effects simply because the year of the week of year                // may be different from the calendar year.  For example, the                // date Dec 28, 1997 is the first day of week 1 of 1998 (if                // weeks start on Sunday and the minimal days in first week is                // <= 3).                int woy = internalGet(WEEK_OF_YEAR);                // Get the ISO year, which matches the week of year.  This                // may be one year before or after the calendar year.                int isoYear = internalGet(YEAR);                int isoDoy = internalGet(DAY_OF_YEAR);                if (internalGet(MONTH) == Calendar.JANUARY) {                    if (woy >= 52) {                        --isoYear;                        isoDoy += yearLength(isoYear);                    }                } else {                    if (woy == 1) {                        isoDoy -= yearLength(isoYear);                        ++isoYear;                    }                }                woy += amount;                // Do fast checks to avoid unnecessary computation:                if (woy < 1 || woy > 52) {                    // Determine the last week of the ISO year.		    // First, we calculate the relative fractional days of the		    // last week of the year. (This doesn't include days in 		    // the year before or after the calendar year.)                    int lastDoy = yearLength(isoYear);                    int normalizedDayOfWeek = internalGet(DAY_OF_WEEK) - getFirstDayOfWeek();                    if (normalizedDayOfWeek < 0) {                        normalizedDayOfWeek += 7;                    }                    int lastRelDow = (lastDoy - isoDoy + normalizedDayOfWeek) % 7;                    if (lastRelDow < 0) {                        lastRelDow += 7;                    }		    // Next, calculate the minimal last week of year.		    // Now this value is just the total number of weeks in the		    // year all of which have 7 days a week. Need to check the		    // first and the last week of the year, which would have 		    // days fewer than 7.                    int lastWoy;                    lastDoy -= (lastRelDow+1);                    lastWoy = lastDoy / 7;		    // If the relative fraction of the first week of the year		    // is more than MinimalDaysInFirstWeek, add 1 to the last		    // week // of the year.                    if ((lastDoy - (lastWoy*7)) >= getMinimalDaysInFirstWeek()) {                        lastWoy++;                    }		    // If the relative fraction of the last week of the year 		    // is more than MinimalDaysInFirstWeek, add 1 to the last		    // week of the year.                    if ((6 - lastRelDow) < getMinimalDaysInFirstWeek()) {                        lastWoy++;                    }                    woy = ((woy + lastWoy - 1) % lastWoy) + 1;                }                set(WEEK_OF_YEAR, woy);                set(YEAR, isoYear);                return;            }        case WEEK_OF_MONTH:            {                // This is tricky, because during the roll we may have to shift                // to a different day of the week.  For example:                //    s  m  t  w  r  f  s                //          1  2  3  4  5                //    6  7  8  9 10 11 12                // When rolling from the 6th or 7th back one week, we go to the                // 1st (assuming that the first partial week counts).  The same                // thing happens at the end of the month.                // The other tricky thing is that we have to figure out whether                // the first partial week actually counts or not, based on the                // minimal first days in the week.  And we have to use the                // correct first day of the week to delineate the week                // boundaries.                // Here's our algorithm.  First, we find the real boundaries of                // the month.  Then we discard the first partial week if it                // doesn't count in this locale.  Then we fill in the ends with                // phantom days, so that the first partial week and the last                // partial week are full weeks.  We then have a nice square                // block of weeks.  We do the usual rolling within this block,                // as is done elsewhere in this method.  If we wind up on one of                // the phantom days that we added, we recognize this and pin to                // the first or the last day of the month.  Easy, eh?                // Normalize the DAY_OF_WEEK so that 0 is the first day of the week                // in this locale.  We have dow in 0..6.                int dow = internalGet(DAY_OF_WEEK) - getFirstDayOfWeek();                if (dow < 0) {		    dow += 7;		}                // Find the day of the week (normalized for locale) for the first                // of the month.                int fdm = (dow - internalGet(DAY_OF_MONTH) + 1) % 7;                if (fdm < 0) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品中文欧美| 国产亚洲一二三区| 91国在线观看| 成人av小说网| 成人午夜电影网站| k8久久久一区二区三区| 国产精品18久久久久久久久久久久| 久久疯狂做爰流白浆xx| 精品一区二区三区影院在线午夜| 美女精品自拍一二三四| 精品一区二区av| 国产一区二区三区在线观看免费视频 | 精品一区二区综合| 韩国午夜理伦三级不卡影院| 国产一区二区伦理| 国产成a人亚洲精品| 成人黄色在线视频| 在线一区二区观看| 91精品麻豆日日躁夜夜躁| 日韩一区二区三区免费看 | 欧美一区二区三区爱爱| 欧美一区二区在线观看| 精品国产网站在线观看| 国产精品视频一二三区| 一区二区在线观看视频在线观看| 午夜国产精品影院在线观看| 另类人妖一区二区av| 成人性生交大片免费看中文| 91丨九色丨蝌蚪丨老版| 在线不卡免费欧美| 久久综合给合久久狠狠狠97色69| 国产精品久久精品日日| 亚洲午夜电影在线| 精品一区二区三区视频| 99久久99久久免费精品蜜臀| 欧美色图天堂网| 精品日韩一区二区三区| 椎名由奈av一区二区三区| 五月综合激情日本mⅴ| 国产精品1区二区.| 色94色欧美sute亚洲13| 日韩视频一区二区| 亚洲欧美色一区| 日本亚洲最大的色成网站www| 国产在线播放一区| 色偷偷成人一区二区三区91| 欧美一区二区三区色| 国产情人综合久久777777| 亚洲国产美国国产综合一区二区| 国模冰冰炮一区二区| 91精品1区2区| www国产亚洲精品久久麻豆| 亚洲久本草在线中文字幕| 精品一区二区三区视频 | 一个色妞综合视频在线观看| 麻豆精品在线看| 91免费视频网| 久久久蜜臀国产一区二区| 一区二区免费在线播放| 国产精品乡下勾搭老头1| 欧美精品亚洲一区二区在线播放| 欧美经典三级视频一区二区三区| 婷婷成人综合网| 99久久国产免费看| 久久久久久久久久久久久女国产乱 | 成人高清免费观看| 91精品国产免费| 中文字幕一区二区三区在线播放| 久色婷婷小香蕉久久| 91福利视频网站| 中文字幕乱码一区二区免费| 青娱乐精品视频在线| 日本道在线观看一区二区| 国产日韩欧美一区二区三区综合| 蜜桃在线一区二区三区| 欧美午夜宅男影院| 亚洲欧美色图小说| 风流少妇一区二区| 精品国产百合女同互慰| 天天av天天翘天天综合网 | 欧美丝袜第三区| 综合久久综合久久| 国产精品1024| 日韩免费成人网| 日本午夜精品视频在线观看| 欧美性猛片aaaaaaa做受| 亚洲精品一二三| 色综合天天综合色综合av | 亚洲欧美色一区| www.欧美日韩国产在线| 久久久精品tv| 国产一区二区三区在线看麻豆| 欧美一级淫片007| 天天色综合成人网| 欧美日韩精品三区| 亚洲一级二级三级在线免费观看| 91丨九色丨尤物| 亚洲少妇中出一区| 色综合天天综合网天天狠天天| 国产精品成人午夜| 成人av动漫在线| 国产精品情趣视频| 成人app软件下载大全免费| 国产无一区二区| 久久一留热品黄| 韩国女主播一区二区三区| 精品乱人伦一区二区三区| 日本中文字幕一区二区有限公司| 欧美日韩激情一区二区三区| 日韩免费看的电影| 欧美中文一区二区三区| 一区二区三区中文在线| 色欧美88888久久久久久影院| 不卡一区在线观看| 日本一区二区综合亚洲| 国产成人激情av| 国产精品三级视频| 波波电影院一区二区三区| 亚洲色图清纯唯美| 色综合久久九月婷婷色综合| 蜜臀国产一区二区三区在线播放| 3d动漫精品啪啪1区2区免费| 国产精品原创巨作av| 国产精品传媒入口麻豆| 91精品一区二区三区久久久久久 | 欧亚洲嫩模精品一区三区| 久久久.com| 尤物视频一区二区| 日日夜夜精品免费视频| 午夜私人影院久久久久| 精品国产一区二区三区四区四| 精品国产sm最大网站免费看| 亚洲人123区| 久99久精品视频免费观看| 色综合天天综合色综合av| 色综合天天做天天爱| 国产精品一区二区三区乱码| 视频一区欧美精品| 亚洲精品国久久99热| 欧美情侣在线播放| 欧美三级电影一区| 欧美综合久久久| av亚洲精华国产精华精华 | 国产精品网站在线观看| 日韩视频免费观看高清完整版 | 日本韩国欧美在线| av电影在线观看一区| 99国产精品久久久久| 欧美午夜精品一区| 欧美亚洲丝袜传媒另类| 日韩一区二区三区在线视频| 久久久久久久久蜜桃| 中文字幕亚洲综合久久菠萝蜜| 亚洲国产成人一区二区三区| 视频一区免费在线观看| 另类调教123区| 国产91综合一区在线观看| 国产在线一区二区| 夫妻av一区二区| 一本色道a无线码一区v| 色婷婷综合中文久久一本| 成人中文字幕在线| 欧美日韩一区二区在线观看| 欧美日韩成人综合在线一区二区| 欧美日韩一二三区| 日韩一区二区麻豆国产| 亚洲欧洲性图库| 色综合久久久久综合体桃花网| 欧美大肚乱孕交hd孕妇| 国产精品国产三级国产普通话三级 | 国产成人福利片| 欧美日韩一级视频| 亚洲欧美日韩小说| 97久久超碰国产精品| 欧美一三区三区四区免费在线看| 日韩精品一区二区三区在线观看| 不卡av在线网| 另类人妖一区二区av| 亚洲一区二区成人在线观看| 欧美激情综合五月色丁香| 欧美激情一区二区| 欧美一二三区精品| 欧美综合色免费| 99v久久综合狠狠综合久久| 国产乱子伦视频一区二区三区 | 国产精品九色蝌蚪自拍| 欧美电影免费提供在线观看| 欧美午夜不卡视频| 95精品视频在线| 成人永久aaa| 国产一区二区三区黄视频 | 日本不卡一二三区黄网| 一二三区精品视频| 亚洲视频你懂的| 国产精品第13页| 欧美国产日产图区| 国产日产精品1区| 久久久久久久久久久久久久久99| 欧美电影免费观看高清完整版| 91精品在线免费观看|