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

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

?? dateformatutilstest.java~15~

?? 很不錯的結合DateTime的綜合例子
?? JAVA~15~
字號:
package com.lianjiping.democ;

import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

public class DateFormatUtilsTest {
    public static void main(String[] args) {
        long currentTimeMillis = DateFormatUtils.getCurrentTimeMillis();
        System.out.println("系統的當前時間(毫秒): " + currentTimeMillis);

        Date currentDate = DateFormatUtils.getCurrentDate();
        System.out.println("系統的當前時間: " + currentDate);

        String currentFormatDate = DateFormatUtils.getCurrentFormatDate();
        System.out.println("系統的當前日期(默認格式): " + currentFormatDate);

        String currentFormatDateTime = DateFormatUtils.getCurrentFormatDateTime();
        System.out.println("系統的當前日期時間(默認格式): " + currentFormatDateTime);

        String currentCustomFomatDateTime12 = DateFormatUtils.
                                              getCurrentCustomFormatDateTime("yyyy-MM-dd HH:mm ");
        System.out.println("系統的當前日期時間(指定格式返回): " + currentCustomFomatDateTime12);

        String formatDate = DateFormatUtils.formatDate(currentDate, "yyMM");
        System.out.println("輸入日期(指定格式返回): " + formatDate);

        String formatDate1 = DateFormatUtils.formatDate(currentDate,
                "yyyyMMdd ", new Locale("zh", "CN", ""));
        System.out.println("輸入日期(指定格式返回): " + formatDate1);

        Date strToDate = DateFormatUtils.parseStrToDate(currentFormatDateTime);
        System.out.println("按照默認格式轉換為Date: " + strToDate);

        Date strToDateTime = DateFormatUtils.parseStrToDateTime(
                currentFormatDateTime);
        System.out.println("按照默認格式轉換為Date: " + strToDateTime);

        Calendar cal = DateFormatUtils.parseStrToCalendar(currentFormatDateTime);
        System.out.println("按照默認格式轉換為Calender: " +
                           cal.get(Calendar.YEAR) + "年" +
                           cal.get(Calendar.MONTH) + "月" +
                           cal.get(Calendar.DAY_OF_MONTH) + "日" +
                           cal.get(Calendar.HOUR_OF_DAY) + ":" +
                           cal.get(Calendar.MINUTE) + ":" +
                           cal.get(Calendar.SECOND));

        String dateTimeStr = DateFormatUtils.parseDateStrToDateTimeStr(
                currentFormatDate);
        System.out.println("日期字符串轉換成日期時間字符串: " + currentFormatDate +
                           " = " + dateTimeStr);

        Date strToFormatDate = DateFormatUtils.parseStrToCustomPatternDate(
                currentFormatDateTime, DateFormatUtils.DATE_TIME_FORMAT);
        Date strToFormatDateTime = DateFormatUtils.parseStrToCustomPatternDate(
                currentFormatDateTime, "");
        System.out.println(" Test 12:    parse String to \n " +
                           " \t\tcustom pattern Date:     " + strToFormatDate +
                           " \n " +
                           " \t\tcustom pattern Date without pattern:     " +
                           strToFormatDateTime);
        System.out.println(" Test 13:     " +
                           DateFormatUtils.formatDate(strToFormatDateTime,
                DateFormatUtils.DATE_TIME_FORMAT));

        String convertPattern = DateFormatUtils.convertDatePattern(
                currentFormatDateTime, DateFormatUtils.DATE_TIME_FORMAT,
                DateFormatUtils.DATE_TIME_FORMAT_14);
        System.out.println(" Test 14:    pattern from:     " +
                           currentFormatDateTime +
                           " \n\t\tpattern to:     " + convertPattern);

        Date addDays = DateFormatUtils.addDays(strToDate, 35);
        System.out.println(" Test 15:    now --  " + strToDate +
                           " ,after add 30 days, \n\t   the time is  " +
                           addDays);
        Date minusDays = DateFormatUtils.minusDays(addDays, 35);
        System.out.println(" Test 16:    now --  " + addDays +
                           " ,after minus 30 days, \n\t   the time is  " +
                           minusDays);

        String addYear = DateFormatUtils.addDate(currentFormatDateTime,
                                                 DateFormatUtils.
                                                 DATE_TIME_FORMAT, " year ", 2);
        String addMonth = DateFormatUtils.addDate(currentFormatDateTime,
                                                  DateFormatUtils.
                                                  DATE_TIME_FORMAT, " month ",
                                                  2);
        String addDay = DateFormatUtils.addDate(currentFormatDateTime,
                                                DateFormatUtils.
                                                DATE_TIME_FORMAT, " day ", 2);
        String addHour = DateFormatUtils.addDate(currentFormatDateTime,
                                                 DateFormatUtils.
                                                 DATE_TIME_FORMAT, " hour ", 2);
        String addMinute = DateFormatUtils.addDate(currentFormatDateTime,
                DateFormatUtils.DATE_TIME_FORMAT, " minute ", 2);
        String minusWeek = DateFormatUtils.minusDate(currentFormatDateTime,
                DateFormatUtils.DATE_TIME_FORMAT, " week ", 2);
        String minusSecond = DateFormatUtils.minusDate(currentFormatDateTime,
                DateFormatUtils.DATE_TIME_FORMAT, " second ", 2);
        System.out.println(" Test 17:    now --  " + currentFormatDateTime +
                           " \n\t add 2 years:     " + addYear +
                           " \n\t add 2 month:     " + addMonth +
                           " \n\t add 2 days:     " + addDay +
                           " \n\t add 2 hours:     " + addHour +
                           " \n\t add 2 minutes:     " + addMinute +
                           " \n\t minus 2 weeks:     " + minusWeek +
                           " \n\t minus 2 seconds:     " + minusSecond);

        System.out.println(" Test 18:     " +
                           " \n\t addMonth compare to addYear :  " +
                           DateFormatUtils.compareDate(addMonth, addYear,
                DateFormatUtils.DATE_TIME_FORMAT) +
                           " \n\t addMonth compare to addDay :  " +
                           DateFormatUtils.compareDate(addMonth, addDay,
                DateFormatUtils.DATE_TIME_FORMAT) +
                           " \n\t addMonth compare to addMonth :  " +
                           DateFormatUtils.compareDate(addMonth, addMonth,
                DateFormatUtils.DATE_TIME_FORMAT));

        String firstDayInMonth = DateFormatUtils.getFirstDayInMonth(
                currentFormatDateTime);
        System.out.println(" Test 19:    the first day in month is  " +
                           firstDayInMonth);

        String lastDayInMonth = DateFormatUtils.getLastDayInMonth(
                currentFormatDateTime);
        System.out.println(" Test 20:    the last day in month is  " +
                           lastDayInMonth);

        String firstDayInWeek = DateFormatUtils.getFirstDayInWeek(
                currentFormatDateTime);
        System.out.println(" Test 21:    the first day in week is  " +
                           firstDayInWeek);

        String lastDayInWeek = DateFormatUtils.getLastDayInWeek(
                currentFormatDateTime);
        System.out.println(" Test 21:    the last day in week is  " +
                           lastDayInWeek);
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线云播放| 国产盗摄精品一区二区三区在线| 国产午夜精品在线观看| 欧美色综合影院| 在线电影一区二区三区| 在线观看视频一区二区| 欧美日韩国产高清一区二区| 欧美精品v日韩精品v韩国精品v| 91麻豆精品国产无毒不卡在线观看| 7777精品伊人久久久大香线蕉 | 天天操天天综合网| 天堂久久久久va久久久久| 日韩精品成人一区二区三区| 另类小说一区二区三区| 国产一区日韩二区欧美三区| va亚洲va日韩不卡在线观看| 日本道在线观看一区二区| 欧美猛男男办公室激情| 亚洲精品在线观| 亚洲女性喷水在线观看一区| 性做久久久久久久久| 麻豆精品一区二区av白丝在线| 国产乱码精品一区二区三区av| 成人午夜看片网址| 欧美电影在线免费观看| 久久青草国产手机看片福利盒子 | 精品在线一区二区| 成人高清免费观看| 欧美精品电影在线播放| 欧美激情在线一区二区| 五月激情丁香一区二区三区| 国产成人综合亚洲网站| 欧美日韩一区视频| 欧美国产国产综合| 蜜臀av性久久久久蜜臀av麻豆 | 亚洲成人在线网站| 国产盗摄一区二区| 51久久夜色精品国产麻豆| 国产精品亲子乱子伦xxxx裸| 午夜精品福利久久久| 成人爱爱电影网址| xnxx国产精品| 免费在线看一区| 欧美亚洲一区二区三区四区| 国产精品三级久久久久三级| 蜜臀久久久久久久| 欧洲中文字幕精品| 中文字幕字幕中文在线中不卡视频| 麻豆精品视频在线观看| 欧洲生活片亚洲生活在线观看| 国产调教视频一区| 久久国产精品色婷婷| 91麻豆精品国产自产在线观看一区 | 精品国产网站在线观看| 亚洲国产日韩av| 91丨porny丨国产| 国产欧美精品一区| 国产精品一卡二卡| 欧美不卡一区二区三区| 日本成人中文字幕在线视频| 欧美亚洲综合网| 亚洲一区二区三区爽爽爽爽爽| av成人免费在线观看| 国产欧美一区二区在线观看| 精品无人区卡一卡二卡三乱码免费卡 | 日韩免费成人网| 夜夜嗨av一区二区三区网页| 不卡一区中文字幕| 欧美国产在线观看| 成人h版在线观看| 国产精品网站导航| av一区二区三区| 国产精品高潮久久久久无| 床上的激情91.| 中文av字幕一区| 色呦呦国产精品| 亚洲一区二区三区四区的| 欧美日韩视频在线观看一区二区三区| 亚洲精品乱码久久久久久久久 | 亚洲人xxxx| 91福利社在线观看| 五月天丁香久久| 日韩一卡二卡三卡国产欧美| 激情成人综合网| 亚洲国产激情av| 色综合视频一区二区三区高清| 亚洲黄网站在线观看| 欧美日韩精品一区视频| 麻豆精品新av中文字幕| 久久精品亚洲精品国产欧美| 成人一区二区在线观看| 一区二区三区四区不卡在线| 欧美人xxxx| 国产91精品在线观看| 亚洲精品国久久99热| 91精品国产aⅴ一区二区| 91猫先生在线| 亚洲午夜免费福利视频| 91精品久久久久久久91蜜桃| 韩国精品主播一区二区在线观看 | 99久久久无码国产精品| 亚洲五码中文字幕| 欧美mv日韩mv国产网站| 99久久伊人精品| 日本伊人色综合网| 国产精品日韩精品欧美在线| 欧美视频第二页| 国产成人精品www牛牛影视| 亚洲精品午夜久久久| 日韩免费在线观看| 色系网站成人免费| 国产精品一区免费视频| 日韩一区二区视频| 国产精品拍天天在线| 欧美日韩精品免费观看视频| 国产麻豆成人精品| 亚洲一区二区三区四区在线观看 | 欧美中文字幕一区| 国产成人综合网站| 日韩精品一级二级 | 亚洲美女视频在线| 精品福利在线导航| 欧美色综合网站| 国产成人精品午夜视频免费| 日日嗨av一区二区三区四区| 亚洲欧美一区二区久久 | 97久久精品人人做人人爽| 蜜臀av性久久久久蜜臀av麻豆| 亚洲欧美国产77777| 精品国产凹凸成av人网站| 欧美高清性hdvideosex| 99国产精品久久| 成人免费av在线| 国产真实乱子伦精品视频| 日韩精品国产欧美| 一区二区在线观看免费| 亚洲视频图片小说| 中文字幕制服丝袜一区二区三区| 精品福利在线导航| 日韩精品中文字幕在线一区| 欧美日韩国产天堂| 欧美亚洲愉拍一区二区| 欧美在线不卡视频| 色婷婷综合视频在线观看| 91老司机福利 在线| 97精品超碰一区二区三区| av在线这里只有精品| caoporen国产精品视频| 92精品国产成人观看免费| av电影在线观看完整版一区二区| 国产成人精品午夜视频免费| 国产福利91精品一区二区三区| 国产v日产∨综合v精品视频| 国产乱子伦视频一区二区三区 | 26uuu国产一区二区三区| 精品免费日韩av| 久久久久久电影| 国产精品天美传媒沈樵| 国产精品蜜臀在线观看| 亚洲免费高清视频在线| 亚洲国产精品一区二区久久| 国产麻豆成人精品| 麻豆成人av在线| 国产成人午夜精品影院观看视频| 捆绑调教美女网站视频一区| 久久91精品国产91久久小草| 国产成人日日夜夜| 91免费观看在线| 538在线一区二区精品国产| 日韩欧美中文一区| 中国色在线观看另类| 亚洲乱码国产乱码精品精可以看 | 麻豆成人综合网| 日本网站在线观看一区二区三区| 久久国产精品99久久人人澡| 国产999精品久久久久久| 色欧美日韩亚洲| 精品久久人人做人人爰| 日韩理论片一区二区| 日韩制服丝袜先锋影音| 国产精品996| 欧美日韩国产欧美日美国产精品| 欧美成人aa大片| 欧美精选午夜久久久乱码6080| 日韩国产欧美三级| 国产中文一区二区三区| 99久久国产综合精品女不卡| 欧美喷水一区二区| 中文字幕国产一区| 天堂久久一区二区三区| 成人avav影音| 精品少妇一区二区三区| 亚洲综合久久久久| 丁香天五香天堂综合| 欧美日本在线观看| 国产精品国产三级国产普通话蜜臀 | 国产日韩v精品一区二区| 亚洲精品日日夜夜| 国产电影精品久久禁18| 91精品一区二区三区在线观看|