@@ -0,0 +1,2139 @@
+package com.string.calendar;%0D%0A%0D%0Aimport java.util.Calendar;%0D%0A%0D%0Apublic class StringCalendarUtil %7B%0D%0A    %0D%0A    /**%0D%0A     * %D7%AA%CE%AA%CA%B1 20160310%0D%0A     * @param timeMillis%0D%0A     * @param type %0D%0A     * @return%0D%0A     */%0D%0A    public static String getNowDateStr(long timeMillis, String separate) %7B%0D%0A        Calendar cal = Calendar.getInstance();%0D%0A        StringBuffer sb = new StringBuffer();%0D%0A        cal.setTimeInMillis(timeMillis);%0D%0A        sb.append(cal.get(Calendar.YEAR));%0D%0A        sb.append(separate);%0D%0A        sb.append(fill(String.valueOf(cal.get(Calendar.MONTH)+1), 2, '0'));%0D%0A        sb.append(separate);%0D%0A        sb.append(fill(String.valueOf(cal.get(Calendar.DAY_OF_MONTH)), 2, '0'));%0D%0A        %0D%0A        return sb.toString();%0D%0A    %7D%0D%0A    %0D%0A    /**%0D%0A     * %D6%B7 place%D2%AAneedFile%C4%B3%0D%0A     * @param needFill %D2%AA%D6%B7%0D%0A     * @param place %D2%AA%E4%B5%BD%CE%BB%0D%0A     * @param fillStuff %D2%AA%D6%B7%0D%0A     * @return%0D%0A     */%0D%0A    public static String fill(String needFill, int place, char fillStuff) %7B%0D%0A        if (needFill == null %7C%7C place == 0) %7B%0D%0A            return needFill;%0D%0A        %7D%0D%0A        if (needFill.length() %3C place) %7B%0D%0A            char%5B%5D result = new char%5Bplace%5D;%0D%0A            for (int i = place-1, j = needFill.length()-1; i %3E= 0; i--, j--) %7B%0D%0A                if (i %3E= place-needFill.length()) %7B%0D%0A                    result%5Bi%5D = needFill.charAt(j);%0D%0A                %7D else %7B%0D%0A                    result%5Bi%5D = fillStuff;%0D%0A                %7D%0D%0A            %7D%0D%0A            return String.valueOf(result);%0D%0A        %7D%0D%0A        return needFill;%0D%0A    %7D%0D%0A    %0D%0A    /**%0D%0A     * %CD%A8%D2%BBdateline%C3%B50%CA%B1dateline%3Cp%3E%0D%0A     * dalineSystem.currentTimeMillis()/1000%C4%B8%CA%BD%0D%0A     * @param dateline%0D%0A     * @return%0D%0A     */%0D%0A    public static long getDaysZeroTimeMillis (long dateline) %7B%0D%0A        return ((dateline/86400*86400) + (dateline%2586400 %3C 57600 ? 0 : 86400)) - 28800;%0D%0A    %7D%0D%0A    %0D%0A    public static void main(String%5B%5D ar) %7B%0D%0A        long time = System.currentTimeMillis();%0D%0A//        Random rd = new Random();%0D%0A        for (long i = 0L; i %3C 10000000L; i++) %7B%0D%0A            getNowDateStr(System.currentTimeMillis(), %22%22);%0D%0A        %7D%0D%0A        System.out.println(System.currentTimeMillis()-time);%0D%0A    %7D%0D%0A%7D%0D%0A

add a calendar util