From f0376f72170c2eb236bec5560b8c5734edd222f1 Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Wed, 31 Mar 2021 17:16:40 +0800
Subject: [PATCH] common模块:     增加了convert工具类,驼峰和下划线相互转换     更新了Date工具类,添加根据Date,day获取目标date的方法     更新WebUtils工具类,添加获取请求Ip方法 manage模块:     组织和后台用户增删改查模块全部完成     增加aop用作日志插入

---
 screen-common/src/main/java/com/moral/util/DateUtils.java | 2352 +++++++++++++++++++++++++++++----------------------------
 1 files changed, 1,193 insertions(+), 1,159 deletions(-)

diff --git a/screen-common/src/main/java/com/moral/util/DateUtils.java b/screen-common/src/main/java/com/moral/util/DateUtils.java
index bfbb3a5..cbc63a2 100644
--- a/screen-common/src/main/java/com/moral/util/DateUtils.java
+++ b/screen-common/src/main/java/com/moral/util/DateUtils.java
@@ -1,7 +1,6 @@
 package com.moral.util;
 
 
-
 import org.springframework.util.StringUtils;
 
 import java.math.BigDecimal;
@@ -16,1254 +15,1289 @@
 
 
 public class DateUtils {
-	/** ������������(yyyy-MM-dd) */
-	public static final String yyyy_MM_dd_EN = "yyyy-MM-dd";
-	/** ������������(yyyy/MM/dd) */
-	public static final String yyyy_MM_dd_decline = "yyyy/MM/dd";
-	/** ������������(yyyyMMdd) */
-	public static final String yyyyMMdd_EN = "yyyyMMdd";
-	/** ������������(yyyy-MM) */
-	public static final String yyyy_MM_EN = "yyyy-MM";
-	/** ������������(yyyyMM) */
-	public static final String yyyyMM_EN = "yyyyMM";
-	/** ������������(yyyy-MM-dd HH:mm:ss) */
-	public static final String yyyy_MM_dd_HH_mm_ss_EN = "yyyy-MM-dd HH:mm:ss";
-	/** ������������(yyyy-MM-dd HH:mm:ss.S) */
-	public static final String yyyy_MM_dd_HH_mm_ss_S_EN = "yyyy-MM-dd HH:mm:ss.S";
-	/** ������������(yyyyMMddHHmmss) */
-	public static final String yyyyMMddHHmmss_EN = "yyyyMMddHHmmss";
-	/** ������������(yyyy���MM���dd���) */
-	public static final String yyyy_MM_dd_CN = "yyyy���MM���dd���";
-	/** ������������(yyyy���MM���dd���HH���mm���ss���) */
-	public static final String yyyy_MM_dd_HH_mm_ss_CN = "yyyy���MM���dd���HH���mm���ss���";
-	/** ������������(yyyy���MM���dd���HH���mm���) */
-	public static final String yyyy_MM_dd_HH_mm_CN = "yyyy���MM���dd���HH���mm���";
-	/** ������boss��������������������������������� */
-	public static final String BJBOSS_DATE = "yyyy-MM-dd'T'HH:mm:ss'Z'";
-	/** ������������(HH:mm:ss) */
-	public static final String HH_mm_ss_EN = "HH:mm:ss";
-	/** DateFormat������ */
-	private static Map<String, DateFormat> dateFormatMap = new HashMap<String, DateFormat>();
+    /**
+     * ������������(yyyy-MM-dd)
+     */
+    public static final String yyyy_MM_dd_EN = "yyyy-MM-dd";
+    /**
+     * ������������(yyyy/MM/dd)
+     */
+    public static final String yyyy_MM_dd_decline = "yyyy/MM/dd";
+    /**
+     * ������������(yyyyMMdd)
+     */
+    public static final String yyyyMMdd_EN = "yyyyMMdd";
+    /**
+     * ������������(yyyy-MM)
+     */
+    public static final String yyyy_MM_EN = "yyyy-MM";
+    /**
+     * ������������(yyyyMM)
+     */
+    public static final String yyyyMM_EN = "yyyyMM";
+    /**
+     * ������������(yyyy-MM-dd HH:mm:ss)
+     */
+    public static final String yyyy_MM_dd_HH_mm_ss_EN = "yyyy-MM-dd HH:mm:ss";
+    /**
+     * ������������(yyyy-MM-dd HH:mm:ss.S)
+     */
+    public static final String yyyy_MM_dd_HH_mm_ss_S_EN = "yyyy-MM-dd HH:mm:ss.S";
+    /**
+     * ������������(yyyyMMddHHmmss)
+     */
+    public static final String yyyyMMddHHmmss_EN = "yyyyMMddHHmmss";
+    /**
+     * ������������(yyyy���MM���dd���)
+     */
+    public static final String yyyy_MM_dd_CN = "yyyy���MM���dd���";
+    /**
+     * ������������(yyyy���MM���dd���HH���mm���ss���)
+     */
+    public static final String yyyy_MM_dd_HH_mm_ss_CN = "yyyy���MM���dd���HH���mm���ss���";
+    /**
+     * ������������(yyyy���MM���dd���HH���mm���)
+     */
+    public static final String yyyy_MM_dd_HH_mm_CN = "yyyy���MM���dd���HH���mm���";
+    /**
+     * ������boss���������������������������������
+     */
+    public static final String BJBOSS_DATE = "yyyy-MM-dd'T'HH:mm:ss'Z'";
+    /**
+     * ������������(HH:mm:ss)
+     */
+    public static final String HH_mm_ss_EN = "HH:mm:ss";
+    /**
+     * DateFormat������
+     */
+    private static Map<String, DateFormat> dateFormatMap = new HashMap<String, DateFormat>();
 
 
+    /**
+     * ������DateFormat
+     *
+     * @param formatStr
+     * @return
+     */
+    public static DateFormat getDateFormat(String formatStr) {
+        DateFormat df = dateFormatMap.get(formatStr);
+        if (df == null) {
+            df = new SimpleDateFormat(formatStr);
+            dateFormatMap.put(formatStr, df);
+        }
+        return df;
+    }
 
+    public static Date getDate() {
+        return Calendar.getInstance().getTime();
+    }
 
-	/**
-	 * ������DateFormat
-	 * 
-	 * @param formatStr
-	 * @return
-	 */
-	public static DateFormat getDateFormat(String formatStr) {
-		DateFormat df = dateFormatMap.get(formatStr);
-		if (df == null) {
-			df = new SimpleDateFormat(formatStr);
-			dateFormatMap.put(formatStr, df);
-		}
-		return df;
-	}
+    /**
+     * ������������formatStr������������������dateTimeStr���Date������ dateTimeStr���������formatStr���������
+     *
+     * @param dateTimeStr
+     * @param formatStr
+     * @return
+     */
+    public static Date getDate(String dateTimeStr, String formatStr) {
+        try {
+            if (dateTimeStr == null || dateTimeStr.equals("")) {
+                return null;
+            }
+            DateFormat sdf = getDateFormat(formatStr);
+            return sdf.parse(dateTimeStr);
+        } catch (ParseException e) {
+            throw new RuntimeException(e);
+        }
+    }
 
-	public static Date getDate() {
-		return Calendar.getInstance().getTime();
-	}
+    /**
+     * ������dateTimeStr���Date������
+     *
+     * @param dateTimeStr
+     * @return
+     */
+    public static Date convertDate(String dateTimeStr) {
+        try {
+            if (dateTimeStr == null || dateTimeStr.equals("")) {
+                return null;
+            }
+            DateFormat sdf = getDateFormat(yyyy_MM_dd_EN);
+            Date d = sdf.parse(dateTimeStr);
+            return d;
+        } catch (ParseException e) {
+            throw new RuntimeException(e);
+        }
+    }
 
-	/**
-	 * ������������formatStr������������������dateTimeStr���Date������ dateTimeStr���������formatStr���������
-	 * 
-	 * @param dateTimeStr
-	 * @param formatStr
-	 * @return
-	 */
-	public static Date getDate(String dateTimeStr, String formatStr) {
-		try {
-			if (dateTimeStr == null || dateTimeStr.equals("")) {
-				return null;
-			}
-			DateFormat sdf = getDateFormat(formatStr);
-			return sdf.parse(dateTimeStr);
-		} catch (ParseException e) {
-			throw new RuntimeException(e);
-		}
-	}
+    /**
+     * ���������������������������������������"yyyy-MM-dd"���������dateTimeStr���Date������ dateTimeStr���������"yyyy-MM-dd"���������
+     *
+     * @param dateTimeStr
+     * @return
+     */
+    public static Date getDate(String dateTimeStr) {
+        return getDate(dateTimeStr, yyyy_MM_dd_EN);
+    }
 
-	/**
-	 * ������dateTimeStr���Date������
-	 * 
-	 * @param dateTimeStr
-	 * @return
-	 */
-	public static Date convertDate(String dateTimeStr) {
-		try {
-			if (dateTimeStr == null || dateTimeStr.equals("")) {
-				return null;
-			}
-			DateFormat sdf = getDateFormat(yyyy_MM_dd_EN);
-			Date d = sdf.parse(dateTimeStr);
-			return d;
-		} catch (ParseException e) {
-			throw new RuntimeException(e);
-		}
-	}
+    /**
+     * ���YYYYMMDD���������Date������
+     *
+     * @param date
+     * @return
+     * @throws Exception
+     */
+    public static Date transferDate(String date) throws Exception {
+        if (date == null || date.length() < 1)
+            return null;
 
-	/**
-	 * ���������������������������������������"yyyy-MM-dd"���������dateTimeStr���Date������ dateTimeStr���������"yyyy-MM-dd"���������
-	 * 
-	 * @param dateTimeStr
-	 * @return
-	 */
-	public static Date getDate(String dateTimeStr) {
-		return getDate(dateTimeStr, yyyy_MM_dd_EN);
-	}
+        if (date.length() != 8)
+            throw new Exception("������������������");
+        String con = "-";
 
-	/**
-	 * ���YYYYMMDD���������Date������
-	 * 
-	 * @param date
-	 * @return
-	 * @throws Exception
-	 */
-	public static Date transferDate(String date) throws Exception {
-		if (date == null || date.length() < 1)
-			return null;
+        String yyyy = date.substring(0, 4);
+        String mm = date.substring(4, 6);
+        String dd = date.substring(6, 8);
 
-		if (date.length() != 8)
-			throw new Exception("������������������");
-		String con = "-";
+        int month = Integer.parseInt(mm);
+        int day = Integer.parseInt(dd);
+        if (month < 1 || month > 12 || day < 1 || day > 31)
+            throw new Exception("������������������");
 
-		String yyyy = date.substring(0, 4);
-		String mm = date.substring(4, 6);
-		String dd = date.substring(6, 8);
+        String str = yyyy + con + mm + con + dd;
+        return getDate(str, yyyy_MM_dd_EN);
+    }
 
-		int month = Integer.parseInt(mm);
-		int day = Integer.parseInt(dd);
-		if (month < 1 || month > 12 || day < 1 || day > 31)
-			throw new Exception("������������������");
+    /**
+     * ���Date���������������������yyyy-mm-dd hh:mm:ss���������������
+     *
+     * @param date
+     * @return
+     */
+    public static String dateToDateString(Date date) {
+        return dateToDateString(date, yyyy_MM_dd_HH_mm_ss_EN);
+    }
 
-		String str = yyyy + con + mm + con + dd;
-		return getDate(str, yyyy_MM_dd_EN);
-	}
+    /**
+     * ���Date���������������������yyyymmddhhmmss���������������
+     *
+     * @param date
+     * @return
+     */
+    public static String dateToDateFullString(Date date) {
+        if (null == date)
+            return null;
+        else
+            return dateToDateString(date, yyyyMMddHHmmss_EN);
+    }
 
-	/**
-	 * ���Date���������������������yyyy-mm-dd hh:mm:ss���������������
-	 * 
-	 * @param date
-	 * @return
-	 */
-	public static String dateToDateString(Date date) {
-		return dateToDateString(date, yyyy_MM_dd_HH_mm_ss_EN);
-	}
+    /**
+     * ���Date���������formatStr������������������
+     *
+     * @param date
+     * @param formatStr
+     * @return
+     */
+    public static String dateToDateString(Date date, String formatStr) {
+        DateFormat df = getDateFormat(formatStr);
+        return df.format(date);
+    }
 
-	/**
-	 * ���Date���������������������yyyymmddhhmmss���������������
-	 * 
-	 * @param date
-	 * @return
-	 */
-	public static String dateToDateFullString(Date date) {
-		if (null == date)
-			return null;
-		else
-			return dateToDateString(date, yyyyMMddHHmmss_EN);
-	}
+    /**
+     * ���String���������formatStr������������������
+     *
+     * @param date
+     * @param formatStr1
+     * @param formatStr2
+     * @return
+     */
+    public static String stringToDateString(String date, String formatStr1, String formatStr2) {
+        Date d = getDate(date, formatStr1);
+        DateFormat df = getDateFormat(formatStr2);
+        return df.format(d);
+    }
 
-	/**
-	 * ���Date���������formatStr������������������
-	 * 
-	 * @param date
-	 * @param formatStr
-	 * @return
-	 */
-	public static String dateToDateString(Date date, String formatStr) {
-		DateFormat df = getDateFormat(formatStr);
-		return df.format(date);
-	}
+    /**
+     * ������������������yyyy-MM-dd���������
+     *
+     * @return
+     */
+    public static String getCurDate() {
+        return dateToDateString(new Date(), yyyy_MM_dd_EN);
+    }
 
-	/**
-	 * ���String���������formatStr������������������
-	 * 
-	 * @param date
-	 * @param formatStr1
-	 * @param formatStr2
-	 * @return
-	 */
-	public static String stringToDateString(String date, String formatStr1, String formatStr2) {
-		Date d = getDate(date, formatStr1);
-		DateFormat df = getDateFormat(formatStr2);
-		return df.format(d);
-	}
+    /**
+     * ������������������
+     *
+     * @return
+     */
+    public static String getCurDate(String formatStr) {
+        return dateToDateString(new Date(), formatStr);
+    }
 
-	/**
-	 * ������������������yyyy-MM-dd���������
-	 * 
-	 * @return
-	 */
-	public static String getCurDate() {
-		return dateToDateString(new Date(), yyyy_MM_dd_EN);
-	}
+    /**
+     * ������������������yyyy���MM���dd������������
+     *
+     * @return
+     */
+    public static String getCurCNDate() {
+        return dateToDateString(new Date(), yyyy_MM_dd_CN);
+    }
 
-	/**
-	 * ������������������
-	 * 
-	 * @return
-	 */
-	public static String getCurDate(String formatStr) {
-		return dateToDateString(new Date(), formatStr);
-	}
+    /**
+     * ������������������������yyyy-MM-dd HH:mm:ss���������
+     *
+     * @return
+     */
+    public static String getCurDateTime() {
+        return dateToDateString(new Date(), yyyy_MM_dd_HH_mm_ss_EN);
+    }
 
-	/**
-	 * ������������������yyyy���MM���dd������������
-	 * 
-	 * @return
-	 */
-	public static String getCurCNDate() {
-		return dateToDateString(new Date(), yyyy_MM_dd_CN);
-	}
+    /**
+     * ������������������������yyyy���MM���dd���HH���mm���ss������������
+     *
+     * @return
+     */
+    public static String getCurZhCNDateTime() {
+        return dateToDateString(new Date(), yyyy_MM_dd_HH_mm_ss_CN);
+    }
 
-	/**
-	 * ������������������������yyyy-MM-dd HH:mm:ss���������
-	 * 
-	 * @return
-	 */
-	public static String getCurDateTime() {
-		return dateToDateString(new Date(), yyyy_MM_dd_HH_mm_ss_EN);
-	}
+    /**
+     * ������������"yyyy-MM-dd HH:mm:ss"������������������������������������������,time2-time1
+     *
+     * @param time1
+     * @param time2
+     * @return
+     */
+    public static long compareDateStr(String time1, String time2) {
+        Date d1 = getDate(time1);
+        Date d2 = getDate(time2);
+        return d2.getTime() - d1.getTime();
+    }
 
-	/**
-	 * ������������������������yyyy���MM���dd���HH���mm���ss������������
-	 * 
-	 * @return
-	 */
-	public static String getCurZhCNDateTime() {
-		return dateToDateString(new Date(), yyyy_MM_dd_HH_mm_ss_CN);
-	}
+    /**
+     * ���������������������������������������
+     *
+     * @param time1
+     * @param time2
+     * @param format
+     * @return
+     */
+    public static long compareDateStr(String time1, String time2, String format) {
+        Date d1 = getDate(time1, format);
+        Date d2 = getDate(time2, format);
+        return d2.getTime() - d1.getTime();
+    }
 
-	/**
-	 * ������������"yyyy-MM-dd HH:mm:ss"������������������������������������������,time2-time1
-	 * 
-	 * @param time1
-	 * @param time2
-	 * @return
-	 */
-	public static long compareDateStr(String time1, String time2) {
-		Date d1 = getDate(time1);
-		Date d2 = getDate(time2);
-		return d2.getTime() - d1.getTime();
-	}
+    /**
+     * ������������������������������������������������
+     *
+     * @param time
+     * @param format
+     * @return
+     */
+    public static long compareDateNow(String time, String format) {
+        Date date = getDate(time, format);
+        return new Date().getTime() - date.getTime();
+    }
 
-	/**
-	 * ���������������������������������������
-	 * 
-	 * @param time1
-	 * @param time2
-	 * @param format
-	 * @return
-	 */
-	public static long compareDateStr(String time1, String time2, String format) {
-		Date d1 = getDate(time1, format);
-		Date d2 = getDate(time2, format);
-		return d2.getTime() - d1.getTime();
-	}
+    /**
+     * ������������"yyyy-MM-dd HH:mm:ss"������������������������������������������,time2-time1
+     *
+     * @param time1
+     * @param time2
+     * @return
+     */
+    public static long compareDateStr(Date time1, Date time2) {
+        return time2.getTime() - time1.getTime();
+    }
 
-	/**
-	 * ������������������������������������������������
-	 * 
-	 * @param time
-	 * @param format
-	 * @return
-	 */
-	public static long compareDateNow(String time, String format) {
-		Date date = getDate(time, format);
-		return new Date().getTime() - date.getTime();
-	}
+    /**
+     * nows������������date������ ���true
+     *
+     * @param nows
+     * @param date
+     * @return
+     */
+    public static boolean isTimeBefor(Date nows, Date date) {
+        long hous = nows.getTime() - date.getTime();
+        if (hous > 0) {
+            return true;
+        } else {
+            return false;
+        }
+    }
 
-	/**
-	 * ������������"yyyy-MM-dd HH:mm:ss"������������������������������������������,time2-time1
-	 * 
-	 * @param time1
-	 * @param time2
-	 * @return
-	 */
-	public static long compareDateStr(Date time1, Date time2) {
-		return time2.getTime() - time1.getTime();
-	}
+    /**
+     * ������������������������������������������������������
+     *
+     * @param hours
+     * @return
+     */
+    public static long getMicroSec(BigDecimal hours) {
+        BigDecimal bd;
+        bd = hours.multiply(new BigDecimal(3600 * 1000));
+        return bd.longValue();
+    }
 
-	/**
-	 * nows������������date������ ���true
-	 * 
-	 * @param nows
-	 * @param date
-	 * @return
-	 */
-	public static boolean isTimeBefor(Date nows, Date date) {
-		long hous = nows.getTime() - date.getTime();
-		if (hous > 0) {
-			return true;
-		} else {
-			return false;
-		}
-	}
+    /**
+     * ������������������years���������������(formatStr)������������
+     *
+     * @param years
+     * @param formatStr
+     * @return
+     */
+    public static String getDateStringOfYear(int years, String formatStr) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(new Date());
+        now.add(Calendar.YEAR, years);
+        return dateToDateString(now.getTime(), formatStr);
+    }
 
-	/**
-	 * ������������������������������������������������������
-	 * 
-	 * @param hours
-	 * @return
-	 */
-	public static long getMicroSec(BigDecimal hours) {
-		BigDecimal bd;
-		bd = hours.multiply(new BigDecimal(3600 * 1000));
-		return bd.longValue();
-	}
+    /**
+     * ������������������mon���������������(formatStr)������������
+     *
+     * @param months
+     * @param formatStr
+     * @return
+     */
+    public static String getDateStringOfMon(int months, String formatStr) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(new Date());
+        now.add(Calendar.MONTH, months);
+        return dateToDateString(now.getTime(), formatStr);
+    }
 
-	/**
-	 * ������������������years���������������(formatStr)������������
-	 * 
-	 * @param years
-	 * @param formatStr
-	 * @return
-	 */
-	public static String getDateStringOfYear(int years, String formatStr) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(new Date());
-		now.add(Calendar.YEAR, years);
-		return dateToDateString(now.getTime(), formatStr);
-	}
+    /**
+     * ������������������days���������������(formatStr)������������
+     *
+     * @param days
+     * @param formatStr
+     * @return
+     */
+    public static String getDateStringOfDay(int days, String formatStr) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(new Date());
+        now.add(Calendar.DATE, days);
+        return dateToDateString(now.getTime(), formatStr);
+    }
 
-	/**
-	 * ������������������mon���������������(formatStr)������������
-	 * 
-	 * @param months
-	 * @param formatStr
-	 * @return
-	 */
-	public static String getDateStringOfMon(int months, String formatStr) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(new Date());
-		now.add(Calendar.MONTH, months);
-		return dateToDateString(now.getTime(), formatStr);
-	}
+    /**
+     * ���������������������������
+     *
+     * @param date
+     * @return
+     */
+    public static int theDateIsToday(String date, String format) {
+        String theDate = stringToDateString(date, format, yyyyMMdd_EN);
+        String today = getDateStringOfDay(0, yyyyMMdd_EN);
+        if (theDate.equals(today)) {
+            return 1;
+        } else {
+            return 0;
+        }
+    }
 
-	/**
-	 * ������������������days���������������(formatStr)������������
-	 * 
-	 * @param days
-	 * @param formatStr
-	 * @return
-	 */
-	public static String getDateStringOfDay(int days, String formatStr) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(new Date());
-		now.add(Calendar.DATE, days);
-		return dateToDateString(now.getTime(), formatStr);
-	}
+    /**
+     * ������������������hours������������������(formatStr)������������
+     *
+     * @param hours
+     * @param formatStr
+     * @return
+     */
+    public static String getDateStringOfHour(int hours, String formatStr) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(new Date());
+        now.add(Calendar.HOUR_OF_DAY, hours);
+        return dateToDateString(now.getTime(), formatStr);
+    }
 
-	/**
-	 * ���������������������������
-	 * 
-	 * @param date
-	 * @return
-	 */
-	public static int theDateIsToday(String date, String format) {
-		String theDate = stringToDateString(date, format, yyyyMMdd_EN);
-		String today = getDateStringOfDay(0, yyyyMMdd_EN);
-		if (theDate.equals(today)) {
-			return 1;
-		} else {
-			return 0;
-		}
-	}
+    /**
+     * ������������������mon���������������(formatStr)������������
+     *
+     * @param date
+     * @param mon
+     * @param formatStr
+     * @return
+     */
+    public static String getDateOfMon(String date, int mon, String formatStr) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(getDate(date, formatStr));
+        now.add(Calendar.MONTH, mon);
+        return dateToDateString(now.getTime(), formatStr);
+    }
 
-	/**
-	 * ������������������hours������������������(formatStr)������������
-	 * 
-	 * @param hours
-	 * @param formatStr
-	 * @return
-	 */
-	public static String getDateStringOfHour(int hours, String formatStr) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(new Date());
-		now.add(Calendar.HOUR_OF_DAY, hours);
-		return dateToDateString(now.getTime(), formatStr);
-	}
+    /**
+     * ������������������day���������������(formatStr)������������
+     *
+     * @param date
+     * @param day
+     * @param formatStr
+     * @return
+     */
+    public static String getDateOfDay(String date, int day, String formatStr) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(getDate(date, formatStr));
+        now.add(Calendar.DATE, day);
+        return dateToDateString(now.getTime(), formatStr);
+    }
 
-	/**
-	 * ������������������mon���������������(formatStr)������������
-	 * 
-	 * @param date
-	 * @param mon
-	 * @param formatStr
-	 * @return
-	 */
-	public static String getDateOfMon(String date, int mon, String formatStr) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(getDate(date, formatStr));
-		now.add(Calendar.MONTH, mon);
-		return dateToDateString(now.getTime(), formatStr);
-	}
+    /**
+    * @Description: ������������������day���������������
+            * @Param: [date, day]
+            * @return: java.util.Date
+            * @Author: ���������
+            * @Date: 2021/3/30
+            */
+    public static Date getDateOfDay(Date date, int day) {
+        if(date==null)
+            return null;
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(date);
+        now.add(Calendar.DAY_OF_MONTH, day);
+        return now.getTime();
+    }
 
-	/**
-	 * ������������������day���������������(formatStr)������������
-	 * 
-	 * @param date
-	 * @param day
-	 * @param formatStr
-	 * @return
-	 */
-	public static String getDateOfDay(String date, int day, String formatStr) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(getDate(date, formatStr));
-		now.add(Calendar.DATE, day);
-		return dateToDateString(now.getTime(), formatStr);
-	}
 
-	public static Date getDate(Date beginDate, int ds) {
-		if (ds == 0)
-			return new Date();
-		try {
-			SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd");
-			Calendar date = Calendar.getInstance();
-			date.setTime(beginDate);
-			date.set(Calendar.DATE, date.get(Calendar.DATE) - ds);
-			Date endDate = dft.parse(dft.format(date.getTime()));
-			return endDate;
-		} catch (ParseException e) {
-			e.printStackTrace();
-		}
-		return new Date();
-	}
+    public static Date getDate(Date beginDate, int ds) {
+        if (ds == 0)
+            return new Date();
+        try {
+            SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd");
+            Calendar date = Calendar.getInstance();
+            date.setTime(beginDate);
+            date.set(Calendar.DATE, date.get(Calendar.DATE) - ds);
+            Date endDate = dft.parse(dft.format(date.getTime()));
+            return endDate;
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return new Date();
+    }
 
-	public static String getAfterNDays(Date date, int n, String formateStr) {
-		SimpleDateFormat sdf = new SimpleDateFormat(formateStr);
-		Calendar calendar = new GregorianCalendar();
-		calendar.setTime(date);
-		calendar.add(Calendar.DATE, n);
-		return sdf.format(calendar.getTime());
-	}
+    public static String getAfterNDays(Date date, int n, String formateStr) {
+        SimpleDateFormat sdf = new SimpleDateFormat(formateStr);
+        Calendar calendar = new GregorianCalendar();
+        calendar.setTime(date);
+        calendar.add(Calendar.DATE, n);
+        return sdf.format(calendar.getTime());
+    }
 
-	/**
-	 * ������������������mins������������������(formatStr)������������
-	 * 
-	 * @param date
-	 * @param mins
-	 * @param formatStr
-	 * @return
-	 */
-	public static String getDateOfMin(String date, int mins, String formatStr) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(getDate(date, formatStr));
-		now.add(Calendar.SECOND, mins * 60);
-		return dateToDateString(now.getTime(), formatStr);
-	}
+    /**
+     * ������������������mins������������������(formatStr)������������
+     *
+     * @param date
+     * @param mins
+     * @param formatStr
+     * @return
+     */
+    public static String getDateOfMin(String date, int mins, String formatStr) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(getDate(date, formatStr));
+        now.add(Calendar.SECOND, mins * 60);
+        return dateToDateString(now.getTime(), formatStr);
+    }
 
-	/**
-	 * ������������������mins������������������������
-	 * 
-	 * @param date
-	 * @param mins
-	 * @return
-	 */
-	public static Date getDateOfMin(Date date, int mins) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(date);
-		now.add(Calendar.SECOND, mins * 60);
-		return now.getTime();
-	}
+    /**
+     * ������������������mins������������������������
+     *
+     * @param date
+     * @param mins
+     * @return
+     */
+    public static Date getDateOfMin(Date date, int mins) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(date);
+        now.add(Calendar.SECOND, mins * 60);
+        return now.getTime();
+    }
 
-	/**
-	 * ������������������mins������������������(formatStr)������������
-	 * 
-	 * @param mins
-	 * @param formatStr
-	 * @return
-	 */
-	public static String getDateStringOfMin(int mins, String formatStr) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(new Date());
-		now.add(Calendar.MINUTE, mins);
-		return dateToDateString(now.getTime(), formatStr);
-	}
+    /**
+     * ������������������mins������������������(formatStr)������������
+     *
+     * @param mins
+     * @param formatStr
+     * @return
+     */
+    public static String getDateStringOfMin(int mins, String formatStr) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(new Date());
+        now.add(Calendar.MINUTE, mins);
+        return dateToDateString(now.getTime(), formatStr);
+    }
 
-	/**
-	 * ������������������mins������������������������
-	 * 
-	 * @param mins
-	 * @return
-	 */
-	public static Date getDateOfMin(int mins) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(new Date());
-		now.add(Calendar.MINUTE, mins);
-		return now.getTime();
-	}
+    /**
+     * ������������������mins������������������������
+     *
+     * @param mins
+     * @return
+     */
+    public static Date getDateOfMin(int mins) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(new Date());
+        now.add(Calendar.MINUTE, mins);
+        return now.getTime();
+    }
 
-	/**
-	 * ������������������sec���������������(formatStr)������������
-	 * 
-	 * @param sec
-	 * @param formatStr
-	 * @return
-	 */
-	public static String getDateStringOfSec(int sec, String formatStr) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(new Date());
-		now.add(Calendar.SECOND, sec);
-		return dateToDateString(now.getTime(), formatStr);
-	}
+    /**
+     * ������������������sec���������������(formatStr)������������
+     *
+     * @param sec
+     * @param formatStr
+     * @return
+     */
+    public static String getDateStringOfSec(int sec, String formatStr) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(new Date());
+        now.add(Calendar.SECOND, sec);
+        return dateToDateString(now.getTime(), formatStr);
+    }
 
-	/**
-	 * ���������������������������������
-	 * 
-	 * @return
-	 */
-	public static int getMonthDay(Date date) {
-		Calendar c = Calendar.getInstance();
-		c.setTime(date);
-		return c.getActualMaximum(Calendar.DAY_OF_MONTH);
+    /**
+     * ���������������������������������
+     *
+     * @return
+     */
+    public static int getMonthDay(Date date) {
+        Calendar c = Calendar.getInstance();
+        c.setTime(date);
+        return c.getActualMaximum(Calendar.DAY_OF_MONTH);
 
-	}
+    }
 
-	/**
-	 * ���������������������������������
-	 * 
-	 * @return
-	 */
-	public static int getCurentMonthDay() {
-		Date date = Calendar.getInstance().getTime();
-		return getMonthDay(date);
-	}
+    /**
+     * ���������������������������������
+     *
+     * @return
+     */
+    public static int getCurentMonthDay() {
+        Date date = Calendar.getInstance().getTime();
+        return getMonthDay(date);
+    }
 
-	/**
-	 * ��������������������������������� yyyy-mm-dd
-	 * 
-	 * @return
-	 */
-	public static int getMonthDay(String date) {
-		Date strDate = getDate(date, yyyy_MM_dd_EN);
-		return getMonthDay(strDate);
-	}
+    /**
+     * ��������������������������������� yyyy-mm-dd
+     *
+     * @return
+     */
+    public static int getMonthDay(String date) {
+        Date strDate = getDate(date, yyyy_MM_dd_EN);
+        return getMonthDay(strDate);
+    }
 
-	/**
-	 * ������19xx,20xx������������
-	 * 
-	 * @param d
-	 * @return
-	 */
-	public static int getYear(Date d) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(d);
-		return now.get(Calendar.YEAR);
-	}
+    /**
+     * ������19xx,20xx������������
+     *
+     * @param d
+     * @return
+     */
+    public static int getYear(Date d) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(d);
+        return now.get(Calendar.YEAR);
+    }
 
-	/**
-	 * ���������������1-12���
-	 * 
-	 * @param d
-	 * @return
-	 */
-	public static int getMonth(Date d) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(d);
-		return now.get(Calendar.MONTH) + 1;
-	}
+    /**
+     * ���������������1-12���
+     *
+     * @param d
+     * @return
+     */
+    public static int getMonth(Date d) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(d);
+        return now.get(Calendar.MONTH) + 1;
+    }
 
-	/**
-	 * ������xxxx-xx-xx������
-	 * 
-	 * @param d
-	 * @return
-	 */
-	public static int getDay(Date d) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(d);
-		return now.get(Calendar.DAY_OF_MONTH);
-	}
+    /**
+     * ������xxxx-xx-xx������
+     *
+     * @param d
+     * @return
+     */
+    public static int getDay(Date d) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(d);
+        return now.get(Calendar.DAY_OF_MONTH);
+    }
 
-	/**
-	 * ������Date������������(24������)
-	 * 
-	 * @param d
-	 * @return
-	 */
-	public static int getHour(Date d) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(d);
-		return now.get(Calendar.HOUR_OF_DAY);
-	}
+    /**
+     * ������Date������������(24������)
+     *
+     * @param d
+     * @return
+     */
+    public static int getHour(Date d) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(d);
+        return now.get(Calendar.HOUR_OF_DAY);
+    }
 
-	/**
-	 * ������Date������������
-	 * 
-	 * @param d
-	 * @return
-	 */
-	public static int getMin(Date d) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(d);
-		return now.get(Calendar.MINUTE);
-	}
+    /**
+     * ������Date������������
+     *
+     * @param d
+     * @return
+     */
+    public static int getMin(Date d) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(d);
+        return now.get(Calendar.MINUTE);
+    }
+
+    /**
+     * ������Date���������
+     *
+     * @param d
+     * @return
+     */
+    public static int getSecond(Date d) {
+        Calendar now = Calendar.getInstance(TimeZone.getDefault());
+        now.setTime(d);
+        return now.get(Calendar.SECOND);
+    }
+
+    /**
+     * ������������������
+     *
+     * @return yyyy-MM-dd
+     */
+    public static String getMondayOfThisWeek() {
+        Calendar c = Calendar.getInstance();
+        int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
+        if (day_of_week == 0)
+            day_of_week = 7;
+        c.add(Calendar.DATE, -day_of_week + 1);
+        return dateToDateString(c.getTime(), yyyy_MM_dd_EN);
+    }
+
+    /**
+     * ������������������
+     *
+     * @return yyyy-MM-dd
+     */
+    public static String getSundayOfThisWeek() {
+        Calendar c = Calendar.getInstance();
+        int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
+        if (day_of_week == 0)
+            day_of_week = 7;
+        c.add(Calendar.DATE, -day_of_week + 7);
+        return dateToDateString(c.getTime());
+    }
+
+    /**
+     * ���������������(*)
+     *
+     * @return yyyy-MM-dd
+     */
+    public static String getDayOfThisWeek(int num) {
+        Calendar c = Calendar.getInstance();
+        int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
+        if (day_of_week == 0)
+            day_of_week = 7;
+        c.add(Calendar.DATE, -day_of_week + num);
+        return dateToDateString(c.getTime(), yyyy_MM_dd_EN);
+    }
+
+    /**
+     * ���������������������
+     *
+     * @return yyyy-MM-dd
+     */
+    public static String getDayOfThisMoon(String num) {
+        String date = dateToDateString(new Date(), yyyy_MM_EN);
+        date = date + "-" + num;
+        return date;
+    }
 
-	/**
-	 * ������Date���������
-	 * 
-	 * @param d
-	 * @return
-	 */
-	public static int getSecond(Date d) {
-		Calendar now = Calendar.getInstance(TimeZone.getDefault());
-		now.setTime(d);
-		return now.get(Calendar.SECOND);
-	}
+    /**
+     * ���������������������������������
+     *
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    public static long getQuotByDays(String beginDate, String endDate) {
+        long quot = 0;
+        DateFormat df = getDateFormat(yyyy_MM_dd_EN);
+        try {
+            Date d1 = df.parse(beginDate);
+            Date d2 = df.parse(endDate);
+            quot = d2.getTime() - d1.getTime();
+            quot = quot / 1000 / 60 / 60 / 24;
+        } catch (ParseException e) {
+            throw new RuntimeException(e);
+        }
+        return quot;
+    }
 
-	/**
-	 * ������������������
-	 * 
-	 * @return yyyy-MM-dd
-	 */
-	public static String getMondayOfThisWeek() {
-		Calendar c = Calendar.getInstance();
-		int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
-		if (day_of_week == 0)
-			day_of_week = 7;
-		c.add(Calendar.DATE, -day_of_week + 1);
-		return dateToDateString(c.getTime(), yyyy_MM_dd_EN);
-	}
+    /**
+     * ���������������������������������������������������
+     *
+     * @param date
+     * @param days
+     * @return
+     */
+    public static String getDateAddDay(String date, int days, String format) {
+        DateFormat df = getDateFormat(format);
+        try {
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(df.parse(date));
+            cal.set(Calendar.DAY_OF_YEAR, cal.get(Calendar.DAY_OF_YEAR) + days);
 
-	/**
-	 * ������������������
-	 * 
-	 * @return yyyy-MM-dd
-	 */
-	public static String getSundayOfThisWeek() {
-		Calendar c = Calendar.getInstance();
-		int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
-		if (day_of_week == 0)
-			day_of_week = 7;
-		c.add(Calendar.DATE, -day_of_week + 7);
-		return dateToDateString(c.getTime());
-	}
+            date = df.format(cal.getTime());
+        } catch (ParseException e) {
+            throw new RuntimeException(e);
+        }
+        return date;
+    }
 
-	/**
-	 * ���������������(*)
-	 * 
-	 * @return yyyy-MM-dd
-	 */
-	public static String getDayOfThisWeek(int num) {
-		Calendar c = Calendar.getInstance();
-		int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
-		if (day_of_week == 0)
-			day_of_week = 7;
-		c.add(Calendar.DATE, -day_of_week + num);
-		return dateToDateString(c.getTime(), yyyy_MM_dd_EN);
-	}
+    /**
+     * ������������������������������
+     *
+     * @return
+     */
+    public static Date getLastDayOfCurrMonth() {
+        Calendar cal = Calendar.getInstance();
+        cal.add(Calendar.MONTH, 1);
+        cal.set(Calendar.DAY_OF_MONTH, 0);
 
-	/**
-	 * ���������������������
-	 * 
-	 * @return yyyy-MM-dd
-	 */
-	public static String getDayOfThisMoon(String num) {
-		String date = dateToDateString(new Date(), yyyy_MM_EN);
-		date = date + "-" + num;
-		return date;
-	}
+        return cal.getTime();
+    }
 
-	/**
-	 * ���������������������������������
-	 * 
-	 * @param beginDate
-	 * @param endDate
-	 * @return
-	 */
-	public static long getQuotByDays(String beginDate, String endDate) {
-		long quot = 0;
-		DateFormat df = getDateFormat(yyyy_MM_dd_EN);
-		try {
-			Date d1 = df.parse(beginDate);
-			Date d2 = df.parse(endDate);
-			quot = d2.getTime() - d1.getTime();
-			quot = quot / 1000 / 60 / 60 / 24;
-		} catch (ParseException e) {
-			throw new RuntimeException(e);
-		}
-		return quot;
-	}
+    /**
+     * ���������������������������������������������������
+     *
+     * @param date
+     * @param m
+     * @return
+     */
+    public static String getDateAddMonth(String date, int m) {
+        DateFormat df = getDateFormat(yyyyMM_EN);
+        try {
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(df.parse(date));
+            cal.add(Calendar.MONTH, m);
+            date = df.format(cal.getTime());
+        } catch (ParseException e) {
+            throw new RuntimeException(e);
+        }
+        return date;
+    }
 
-	/**
-	 * ���������������������������������������������������
-	 * 
-	 * @param date
-	 * @param days
-	 * @return
-	 */
-	public static String getDateAddDay(String date, int days, String format) {
-		DateFormat df = getDateFormat(format);
-		try {
-			Calendar cal = Calendar.getInstance();
-			cal.setTime(df.parse(date));
-			cal.set(Calendar.DAY_OF_YEAR, cal.get(Calendar.DAY_OF_YEAR) + days);
+    /**
+     * ������������������������������
+     *
+     * @param year
+     * @param month
+     * @return
+     */
+    public static String getFirstDayOfMonth(int year, int month) {
+        Calendar cal = Calendar.getInstance();
+        // ������������
+        cal.set(Calendar.YEAR, year);
+        // ������������
+        cal.set(Calendar.MONTH, month - 1);
+        // ������������������������
+        int lastDay = cal.getActualMinimum(Calendar.DAY_OF_MONTH);
+        // ������������������������������������
+        cal.set(Calendar.DAY_OF_MONTH, lastDay);
+        // ���������������
+        DateFormat df = getDateFormat(yyyy_MM_dd_EN);
+        return df.format(cal.getTime());
+    }
 
-			date = df.format(cal.getTime());
-		} catch (ParseException e) {
-			throw new RuntimeException(e);
-		}
-		return date;
-	}
+    /**
+     * ������������������������������
+     *
+     * @param year
+     * @param month
+     * @return
+     */
+    public static String getLastDayOfMonth(int year, int month) {
+        Calendar cal = Calendar.getInstance();
+        // ������������
+        cal.set(Calendar.YEAR, year);
+        // ������������
+        cal.set(Calendar.MONTH, month - 1);
+        // ������������������������
+        int lastDay = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
+        // ������������������������������������
+        cal.set(Calendar.DAY_OF_MONTH, lastDay);
+        // ���������������
+        DateFormat df = getDateFormat(yyyy_MM_dd_EN);
+        return df.format(cal.getTime());
+    }
 
-	/**
-	 * ������������������������������
-	 * 
-	 * @return
-	 */
-	public static Date getLastDayOfCurrMonth() {
-		Calendar cal = Calendar.getInstance();
-		cal.add(Calendar.MONTH, 1);
-		cal.set(Calendar.DAY_OF_MONTH, 0);
+    /**
+     * ������������������
+     *
+     * @param date
+     * @return
+     * @throws ParseException
+     */
+    public static String getYesterday(Date date) throws ParseException {
+        DateFormat df = getDateFormat(yyyy_MM_dd_EN);
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(df.parse(df.format(date)));
+        calendar.add(Calendar.DAY_OF_MONTH, -1);
+        return df.format(calendar.getTime());
+    }
 
-		return cal.getTime();
-	}
 
-	/**
-	 * ���������������������������������������������������
-	 * 
-	 * @param date
-	 * @param m
-	 * @return
-	 */
-	public static String getDateAddMonth(String date, int m) {
-		DateFormat df = getDateFormat(yyyyMM_EN);
-		try {
-			Calendar cal = Calendar.getInstance();
-			cal.setTime(df.parse(date));
-			cal.add(Calendar.MONTH, m);
-			date = df.format(cal.getTime());
-		} catch (ParseException e) {
-			throw new RuntimeException(e);
-		}
-		return date;
-	}
+    /**
+     * 10���������������������
+     *
+     * @param dateInt
+     * @param format
+     * @return
+     */
+    public static String getIntToStr(String dateInt, String format) {
+        DateFormat df = getDateFormat(format);
+        long times = Integer.parseInt(dateInt) * 1000L;
+        Date date = new Date(times);
+        return df.format(date);
+    }
 
-	/**
-	 * ������������������������������
-	 * 
-	 * @param year
-	 * @param month
-	 * @return
-	 */
-	public static String getFirstDayOfMonth(int year, int month) {
-		Calendar cal = Calendar.getInstance();
-		// ������������
-		cal.set(Calendar.YEAR, year);
-		// ������������
-		cal.set(Calendar.MONTH, month - 1);
-		// ������������������������
-		int lastDay = cal.getActualMinimum(Calendar.DAY_OF_MONTH);
-		// ������������������������������������
-		cal.set(Calendar.DAY_OF_MONTH, lastDay);
-		// ���������������
-		DateFormat df = getDateFormat(yyyy_MM_dd_EN);
-		return df.format(cal.getTime());
-	}
+    /**
+     * ������ 10������������
+     *
+     * @return
+     */
+    public static Integer getDateInt() {
+        return (int) (System.currentTimeMillis() / 1000);
+    }
 
-	/**
-	 * ������������������������������
-	 * 
-	 * @param year
-	 * @param month
-	 * @return
-	 */
-	public static String getLastDayOfMonth(int year, int month) {
-		Calendar cal = Calendar.getInstance();
-		// ������������
-		cal.set(Calendar.YEAR, year);
-		// ������������
-		cal.set(Calendar.MONTH, month - 1);
-		// ������������������������
-		int lastDay = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
-		// ������������������������������������
-		cal.set(Calendar.DAY_OF_MONTH, lastDay);
-		// ���������������
-		DateFormat df = getDateFormat(yyyy_MM_dd_EN);
-		return df.format(cal.getTime());
-	}
+    /**
+     * 13���������������������
+     *
+     * @param time
+     * @param format
+     * @return
+     */
+    public static String getLongToStr(long time, String format) {
+        Date date = new Date(time);
+        return dateToDateString(date, format);
+    }
 
-	/**
-	 * ������������������
-	 * 
-	 * @param date
-	 * @return
-	 * @throws ParseException
-	 */
-	public static String getYesterday(Date date) throws ParseException {
-		DateFormat df = getDateFormat(yyyy_MM_dd_EN);
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(df.parse(df.format(date)));
-		calendar.add(Calendar.DAY_OF_MONTH, -1);
-		return df.format(calendar.getTime());
-	}
+    /**
+     * ������������������������������������
+     *
+     * @param start
+     * @param end
+     * @return
+     */
+    public static int getIntervalSec(int start, int end) {
+        return (end - start) * 60 * 60;
+    }
 
+    /**
+     * ���������������������������������
+     *
+     * @param time
+     * @return
+     */
+    public static String getMillsStr(long time) {
+        String timeStr = String.valueOf(time);
+        String suffix = timeStr.substring(0, timeStr.length() - 3);
+        String prefix = timeStr.substring(timeStr.length() - 3, timeStr.length());
+        return suffix + "." + prefix;
+    }
 
-	/**
-	 * 10���������������������
-	 * 
-	 * @param dateInt
-	 * @param format
-	 * @return
-	 */
-	public static String getIntToStr(String dateInt, String format) {
-		DateFormat df = getDateFormat(format);
-		long times = Integer.parseInt(dateInt) * 1000L;
-		Date date = new Date(times);
-		return df.format(date);
-	}
+    /**
+     * ���������������������������������������������
+     *
+     * @param timeStr
+     * @param formatStr
+     * @return
+     */
+    public static String longToString(String timeStr, String formatStr) {
+        long times = Long.parseLong(timeStr.replace(".", ""));
+        Date date = new Date(times);
+        return dateToDateString(date, formatStr);
+    }
 
-	/**
-	 * ������ 10������������
-	 * 
-	 * @return
-	 */
-	public static Integer getDateInt() {
-		return (int) (System.currentTimeMillis() / 1000);
-	}
+    /**
+     * ������������������������
+     *
+     * @return
+     */
+    public static Long getTodayTime() {
+        Calendar todayStart = Calendar.getInstance();
+        todayStart.set(Calendar.HOUR_OF_DAY, 0);
+        todayStart.set(Calendar.MINUTE, 0);
+        todayStart.set(Calendar.SECOND, 0);
+        todayStart.set(Calendar.MILLISECOND, 0);
+        return todayStart.getTime().getTime();
+    }
 
-	/**
-	 * 13���������������������
-	 * 
-	 * @param time
-	 * @param format
-	 * @return
-	 */
-	public static String getLongToStr(long time, String format) {
-		Date date = new Date(time);
-		return dateToDateString(date, format);
-	}
+    public static Integer getTodayInt() {
+        return (int) (getTodayTime() / 1000);
+    }
 
-	/**
-	 * ������������������������������������
-	 * 
-	 * @param start
-	 * @param end
-	 * @return
-	 */
-	public static int getIntervalSec(int start, int end) {
-		return (end - start) * 60 * 60;
-	}
+    /**
+     * ������������������������
+     *
+     * @return
+     */
+    public static Long getEndTime() {
+        Calendar todayEnd = Calendar.getInstance();
+        todayEnd.set(Calendar.HOUR, 23);
+        todayEnd.set(Calendar.MINUTE, 59);
+        todayEnd.set(Calendar.SECOND, 59);
+        todayEnd.set(Calendar.MILLISECOND, 999);
+        return todayEnd.getTime().getTime();
+    }
 
-	/**
-	 * ���������������������������������
-	 * 
-	 * @param time
-	 * @return
-	 */
-	public static String getMillsStr(long time) {
-		String timeStr = String.valueOf(time);
-		String suffix = timeStr.substring(0, timeStr.length() - 3);
-		String prefix = timeStr.substring(timeStr.length() - 3, timeStr.length());
-		return suffix + "." + prefix;
-	}
+    public static Integer getTomorrowInt() {
+        return (int) (getTomorrowTime() / 1000);
+    }
 
-	/**
-	 * ���������������������������������������������
-	 * 
-	 * @param timeStr
-	 * @param formatStr
-	 * @return
-	 */
-	public static String longToString(String timeStr, String formatStr) {
-		long times = Long.parseLong(timeStr.replace(".", ""));
-		Date date = new Date(times);
-		return dateToDateString(date, formatStr);
-	}
+    /**
+     * ���������������������������
+     *
+     * @return
+     */
+    public static Long getTomorrowTime() {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(new Date());
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+        cal.set(Calendar.MILLISECOND, 0);
+        cal.add(Calendar.DAY_OF_MONTH, 1);
+        return cal.getTime().getTime();
+    }
 
-	/**
-	 * ������������������������
-	 * 
-	 * @return
-	 */
-	public static Long getTodayTime() {
-		Calendar todayStart = Calendar.getInstance();
-		todayStart.set(Calendar.HOUR_OF_DAY, 0);
-		todayStart.set(Calendar.MINUTE, 0);
-		todayStart.set(Calendar.SECOND, 0);
-		todayStart.set(Calendar.MILLISECOND, 0);
-		return todayStart.getTime().getTime();
-	}
+    /**
+     * ���������������������������������
+     *
+     * @param hour
+     * @return
+     */
+    public static Long getPointHourTime(int hour) {
+        Calendar todayStart = Calendar.getInstance();
+        todayStart.set(Calendar.HOUR_OF_DAY, hour);
+        todayStart.set(Calendar.MINUTE, 0);
+        todayStart.set(Calendar.SECOND, 0);
+        todayStart.set(Calendar.MILLISECOND, 0);
+        return todayStart.getTime().getTime();
+    }
 
-	public static Integer getTodayInt() {
-		return (int) (getTodayTime() / 1000);
-	}
+    /**
+     * ������������n���������h������
+     *
+     * @param days
+     * @param hour
+     * @return
+     */
+    public static Long getPointDateHourTime(int days, int hour) {
+        Calendar todayStart = Calendar.getInstance();
+        todayStart.add(Calendar.DATE, days);
+        todayStart.set(Calendar.HOUR_OF_DAY, hour);
+        todayStart.set(Calendar.MINUTE, 0);
+        todayStart.set(Calendar.SECOND, 0);
+        todayStart.set(Calendar.MILLISECOND, 0);
+        return todayStart.getTime().getTime();
+    }
 
-	/**
-	 * ������������������������
-	 * 
-	 * @return
-	 */
-	public static Long getEndTime() {
-		Calendar todayEnd = Calendar.getInstance();
-		todayEnd.set(Calendar.HOUR, 23);
-		todayEnd.set(Calendar.MINUTE, 59);
-		todayEnd.set(Calendar.SECOND, 59);
-		todayEnd.set(Calendar.MILLISECOND, 999);
-		return todayEnd.getTime().getTime();
-	}
+    /**
+     * ���������������������
+     *
+     * @param time
+     * @return
+     */
+    public static Integer hourTosec(String time) {
+        if ("null".equals(time) || StringUtils.isEmpty(time)) {
+            return null;
+        }
+        if (time.length() <= 5) {
+            time += ":00";
+        }
+        int index1 = time.indexOf(":");
+        int index2 = time.indexOf(":", index1 + 1);
+        int hh = Integer.parseInt(time.substring(0, index1));
+        int mi = Integer.parseInt(time.substring(index1 + 1, index2));
+        int ss = Integer.parseInt(time.substring(index2 + 1));
+        return hh * 60 * 60 + mi * 60 + ss;
+    }
 
-	public static Integer getTomorrowInt() {
-		return (int) (getTomorrowTime() / 1000);
-	}
+    /**
+     * ���������������������
+     *
+     * @param time
+     * @return
+     */
+    public static Integer minTosec(String time) {
+        if (time.length() <= 5) {
+            time += ":00";
+        }
+        int index1 = time.indexOf(":");
+        int index2 = time.indexOf(":", index1 + 1);
+        int mi = Integer.parseInt(time.substring(0, index1));
+        int ss = Integer.parseInt(time.substring(index1 + 1, index2));
+        return mi * 60 + ss;
+    }
 
-	/**
-	 * ���������������������������
-	 * 
-	 * @return
-	 */
-	public static Long getTomorrowTime() {
-		Calendar cal = Calendar.getInstance();
-		cal.setTime(new Date());
-		cal.set(Calendar.HOUR_OF_DAY, 0);
-		cal.set(Calendar.MINUTE, 0);
-		cal.set(Calendar.SECOND, 0);
-		cal.set(Calendar.MILLISECOND, 0);
-		cal.add(Calendar.DAY_OF_MONTH, 1);
-		return cal.getTime().getTime();
-	}
 
-	/**
-	 * ���������������������������������
-	 * 
-	 * @param hour
-	 * @return
-	 */
-	public static Long getPointHourTime(int hour) {
-		Calendar todayStart = Calendar.getInstance();
-		todayStart.set(Calendar.HOUR_OF_DAY, hour);
-		todayStart.set(Calendar.MINUTE, 0);
-		todayStart.set(Calendar.SECOND, 0);
-		todayStart.set(Calendar.MILLISECOND, 0);
-		return todayStart.getTime().getTime();
-	}
+    public static boolean isDate(String dateTimeStr, String formatStr) {
+        DateFormat df = getDateFormat(formatStr);
+        try {
+            df.parse(dateTimeStr);
+            return true;
+        } catch (Exception e) {
+            return false;
+        }
+    }
 
-	/**
-	 * ������������n���������h������
-	 * 
-	 * @param days
-	 * @param hour
-	 * @return
-	 */
-	public static Long getPointDateHourTime(int days, int hour) {
-		Calendar todayStart = Calendar.getInstance();
-		todayStart.add(Calendar.DATE, days);
-		todayStart.set(Calendar.HOUR_OF_DAY, hour);
-		todayStart.set(Calendar.MINUTE, 0);
-		todayStart.set(Calendar.SECOND, 0);
-		todayStart.set(Calendar.MILLISECOND, 0);
-		return todayStart.getTime().getTime();
-	}
+    /**
+     * ���������������������������������
+     *
+     * @param strDate      ������������ yyyy-MM-dd HH:mm:ss
+     * @param strDateBegin ������������ 00:00:00
+     * @param strDateEnd   ������������ 00:05:00
+     * @return
+     */
+    public static boolean isInDate(String strDate, String strDateBegin, String strDateEnd) {
+        // ���������������������������
+        int strDateH = Integer.parseInt(strDate.substring(11, 13));
+        int strDateM = Integer.parseInt(strDate.substring(14, 16));
+        int strDateS = Integer.parseInt(strDate.substring(17, 19));
+        // ���������������������������
+        int strDateBeginH = Integer.parseInt(strDateBegin.substring(0, 2));
+        int strDateBeginM = Integer.parseInt(strDateBegin.substring(3, 5));
+        int strDateBeginS = Integer.parseInt(strDateBegin.substring(6, 8));
+        // ���������������������������
+        int strDateEndH = Integer.parseInt(strDateEnd.substring(0, 2));
+        int strDateEndM = Integer.parseInt(strDateEnd.substring(3, 5));
+        int strDateEndS = Integer.parseInt(strDateEnd.substring(6, 8));
+        if ((strDateH >= strDateBeginH && strDateH <= strDateEndH)) {
+            // ������������������������������������������������������������������
+            if (strDateH > strDateBeginH && strDateH < strDateEndH) {
+                return true;
+                // ������������������������������������������������������������������������������������
+            } else if (strDateH == strDateBeginH && strDateM >= strDateBeginM && strDateM <= strDateEndM) {
+                return true;
+                // ������������������������������������������������������������������������������������������������������������������������
+            } else if (strDateH == strDateBeginH && strDateM == strDateBeginM && strDateS >= strDateBeginS
+                    && strDateS <= strDateEndS) {
+                return true;
+            }
+            // ���������������������������������������������������������������������������������������������������������������������������
+            else if (strDateH >= strDateBeginH && strDateH == strDateEndH && strDateM <= strDateEndM) {
+                return true;
+                // ������������������������������������������������������������������������������������������������������������������������������������������������������������
+            } else if (strDateH >= strDateBeginH && strDateH == strDateEndH && strDateM == strDateEndM
+                    && strDateS <= strDateEndS) {
+                return true;
+            } else {
+                return false;
+            }
+        } else {
+            return false;
+        }
+    }
 
-	/**
-	 * ���������������������
-	 * 
-	 * @param time
-	 * @return
-	 */
-	public static Integer hourTosec(String time) {
-		if ("null".equals(time) || StringUtils.isEmpty(time)) {
-			return null;
-		}
-		if (time.length() <= 5) {
-			time += ":00";
-		}
-		int index1 = time.indexOf(":");
-		int index2 = time.indexOf(":", index1 + 1);
-		int hh = Integer.parseInt(time.substring(0, index1));
-		int mi = Integer.parseInt(time.substring(index1 + 1, index2));
-		int ss = Integer.parseInt(time.substring(index2 + 1));
-		return hh * 60 * 60 + mi * 60 + ss;
-	}
+    /**
+     * ���������������������������������
+     *
+     * @param date         ������������ yyyy-MM-dd HH:mm:ss
+     * @param strDateBegin ������������ 00:00:00
+     * @param strDateEnd   ������������ 00:05:00
+     * @return
+     */
+    public static boolean isInDate(Date date, String strDateBegin, String strDateEnd) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String strDate = sdf.format(date);
+        // ���������������������������
+        int strDateH = Integer.parseInt(strDate.substring(11, 13));
+        int strDateM = Integer.parseInt(strDate.substring(14, 16));
+        int strDateS = Integer.parseInt(strDate.substring(17, 19));
+        // ���������������������������
+        int strDateBeginH = Integer.parseInt(strDateBegin.substring(0, 2));
+        int strDateBeginM = Integer.parseInt(strDateBegin.substring(3, 5));
+        int strDateBeginS = Integer.parseInt(strDateBegin.substring(6, 8));
+        // ���������������������������
+        int strDateEndH = Integer.parseInt(strDateEnd.substring(0, 2));
+        int strDateEndM = Integer.parseInt(strDateEnd.substring(3, 5));
+        int strDateEndS = Integer.parseInt(strDateEnd.substring(6, 8));
+        if ((strDateH >= strDateBeginH && strDateH <= strDateEndH)) {
+            // ������������������������������������������������������������������
+            if (strDateH > strDateBeginH && strDateH < strDateEndH) {
+                return true;
+                // ������������������������������������������������������������������������������������
+            } else if (strDateH == strDateBeginH && strDateM >= strDateBeginM && strDateM <= strDateEndM) {
+                return true;
+                // ������������������������������������������������������������������������������������������������������������������������
+            } else if (strDateH == strDateBeginH && strDateM == strDateBeginM && strDateS >= strDateBeginS
+                    && strDateS <= strDateEndS) {
+                return true;
+            }
+            // ���������������������������������������������������������������������������������������������������������������������������
+            else if (strDateH >= strDateBeginH && strDateH == strDateEndH && strDateM <= strDateEndM) {
+                return true;
+                // ������������������������������������������������������������������������������������������������������������������������������������������������������������
+            } else if (strDateH >= strDateBeginH && strDateH == strDateEndH && strDateM == strDateEndM
+                    && strDateS <= strDateEndS) {
+                return true;
+            } else {
+                return false;
+            }
+        } else {
+            return false;
+        }
+    }
 
-	/**
-	 * ���������������������
-	 * 
-	 * @param time
-	 * @return
-	 */
-	public static Integer minTosec(String time) {
-		if (time.length() <= 5) {
-			time += ":00";
-		}
-		int index1 = time.indexOf(":");
-		int index2 = time.indexOf(":", index1 + 1);
-		int mi = Integer.parseInt(time.substring(0, index1));
-		int ss = Integer.parseInt(time.substring(index1 + 1, index2));
-		return mi * 60 + ss;
-	}
+    public static boolean isInTime(int time, int begin, int end) {
+        if (time >= begin && time < end) {
+            return true;
+        }
+        return false;
+    }
 
+    public static int getMinutest(String begin, String format) {
+        String nowMinutes = getCurDate("HH:mm");
+        long time = compareDateStr("09:00", nowMinutes, "HH:mm");
+        return (int) time;
+    }
 
+    /**
+     * <p>
+     * Title: addDays
+     * </p>
+     * <p>
+     * Description: ������������
+     * </p>
+     *
+     * @param days
+     * @return
+     */
+    public static Date addDays(Date date, int days) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.add(Calendar.DATE, days);
+        return calendar.getTime();
+    }
 
-	public static boolean isDate(String dateTimeStr, String formatStr) {
-		DateFormat df = getDateFormat(formatStr);
-		try {
-			df.parse(dateTimeStr);
-			return true;
-		} catch (Exception e) {
-			return false;
-		}
-	}
+    /**
+     * <p>
+     * Title: addMonths
+     * </p>
+     * <p>
+     * Description: ������������
+     * </p>
+     *
+     * @param date
+     * @param months
+     * @return
+     */
+    public static Date addMonths(Date date, int months) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.add(Calendar.MONTH, months);
+        return calendar.getTime();
+    }
 
-	/**
-	 * ���������������������������������
-	 * 
-	 * @param strDate
-	 *            ������������ yyyy-MM-dd HH:mm:ss
-	 * @param strDateBegin
-	 *            ������������ 00:00:00
-	 * @param strDateEnd
-	 *            ������������ 00:05:00
-	 * @return
-	 */
-	public static boolean isInDate(String strDate, String strDateBegin, String strDateEnd) {
-		// ���������������������������
-		int strDateH = Integer.parseInt(strDate.substring(11, 13));
-		int strDateM = Integer.parseInt(strDate.substring(14, 16));
-		int strDateS = Integer.parseInt(strDate.substring(17, 19));
-		// ���������������������������
-		int strDateBeginH = Integer.parseInt(strDateBegin.substring(0, 2));
-		int strDateBeginM = Integer.parseInt(strDateBegin.substring(3, 5));
-		int strDateBeginS = Integer.parseInt(strDateBegin.substring(6, 8));
-		// ���������������������������
-		int strDateEndH = Integer.parseInt(strDateEnd.substring(0, 2));
-		int strDateEndM = Integer.parseInt(strDateEnd.substring(3, 5));
-		int strDateEndS = Integer.parseInt(strDateEnd.substring(6, 8));
-		if ((strDateH >= strDateBeginH && strDateH <= strDateEndH)) {
-			// ������������������������������������������������������������������
-			if (strDateH > strDateBeginH && strDateH < strDateEndH) {
-				return true;
-				// ������������������������������������������������������������������������������������
-			} else if (strDateH == strDateBeginH && strDateM >= strDateBeginM && strDateM <= strDateEndM) {
-				return true;
-				// ������������������������������������������������������������������������������������������������������������������������
-			} else if (strDateH == strDateBeginH && strDateM == strDateBeginM && strDateS >= strDateBeginS
-					&& strDateS <= strDateEndS) {
-				return true;
-			}
-			// ���������������������������������������������������������������������������������������������������������������������������
-			else if (strDateH >= strDateBeginH && strDateH == strDateEndH && strDateM <= strDateEndM) {
-				return true;
-				// ������������������������������������������������������������������������������������������������������������������������������������������������������������
-			} else if (strDateH >= strDateBeginH && strDateH == strDateEndH && strDateM == strDateEndM
-					&& strDateS <= strDateEndS) {
-				return true;
-			} else {
-				return false;
-			}
-		} else {
-			return false;
-		}
-	}
+    /**
+     * <p>
+     * Title: getDays
+     * </p>
+     * <p>
+     * Description: ���������������������������������������
+     * </p>
+     *
+     * @param minDate
+     * @param maxDate
+     * @return
+     */
+    public static int getDays(Date minDate, Date maxDate) {
+        int days = 0;
+        if (null == minDate || null == maxDate)
+            return days;
+        days = (int) ((maxDate.getTime() - minDate.getTime()) / (24 * 60 * 60 * 1000));
+        return days;
+    }
 
-	/**
-	 * ���������������������������������
-	 * 
-	 * @param date
-	 *            ������������ yyyy-MM-dd HH:mm:ss
-	 * @param strDateBegin
-	 *            ������������ 00:00:00
-	 * @param strDateEnd
-	 *            ������������ 00:05:00
-	 * @return
-	 */
-	public static boolean isInDate(Date date, String strDateBegin, String strDateEnd) {
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-		String strDate = sdf.format(date);
-		// ���������������������������
-		int strDateH = Integer.parseInt(strDate.substring(11, 13));
-		int strDateM = Integer.parseInt(strDate.substring(14, 16));
-		int strDateS = Integer.parseInt(strDate.substring(17, 19));
-		// ���������������������������
-		int strDateBeginH = Integer.parseInt(strDateBegin.substring(0, 2));
-		int strDateBeginM = Integer.parseInt(strDateBegin.substring(3, 5));
-		int strDateBeginS = Integer.parseInt(strDateBegin.substring(6, 8));
-		// ���������������������������
-		int strDateEndH = Integer.parseInt(strDateEnd.substring(0, 2));
-		int strDateEndM = Integer.parseInt(strDateEnd.substring(3, 5));
-		int strDateEndS = Integer.parseInt(strDateEnd.substring(6, 8));
-		if ((strDateH >= strDateBeginH && strDateH <= strDateEndH)) {
-			// ������������������������������������������������������������������
-			if (strDateH > strDateBeginH && strDateH < strDateEndH) {
-				return true;
-				// ������������������������������������������������������������������������������������
-			} else if (strDateH == strDateBeginH && strDateM >= strDateBeginM && strDateM <= strDateEndM) {
-				return true;
-				// ������������������������������������������������������������������������������������������������������������������������
-			} else if (strDateH == strDateBeginH && strDateM == strDateBeginM && strDateS >= strDateBeginS
-					&& strDateS <= strDateEndS) {
-				return true;
-			}
-			// ���������������������������������������������������������������������������������������������������������������������������
-			else if (strDateH >= strDateBeginH && strDateH == strDateEndH && strDateM <= strDateEndM) {
-				return true;
-				// ������������������������������������������������������������������������������������������������������������������������������������������������������������
-			} else if (strDateH >= strDateBeginH && strDateH == strDateEndH && strDateM == strDateEndM
-					&& strDateS <= strDateEndS) {
-				return true;
-			} else {
-				return false;
-			}
-		} else {
-			return false;
-		}
-	}
+    /**
+     * ������������ date
+     *
+     * @param longDate ���������
+     * @return
+     */
+    public static Date getConversionDateByLong(long longDate) {
+        //1529398742830
+        ZoneId zid = ZoneId.systemDefault();
+        LocalDateTime time = LocalDateTime.ofInstant(Instant.ofEpochMilli(longDate), zid);
+        ZonedDateTime zdt = time.atZone(zid);
+        Date date = Date.from(zdt.toInstant());
+        return date;
+    }
 
-	public static boolean isInTime(int time, int begin, int end) {
-		if (time >= begin && time < end) {
-			return true;
-		}
-		return false;
-	}
+    /**
+     * yyyyMMdd ��� yyyy_MM_dd
+     *
+     * @param strData ���������
+     * @return
+     */
+    public static String getdatefor_yyyy_MM_dd(String strData) {
+        //1529398742830
+        //20180205
+        String yyyy_MM_dd = "";
+        if (null == strData || strData.length() == 0) {
+            return yyyy_MM_dd;
+        } else {
+            String yyyy = strData.substring(0, 4);
+            String mm = strData.substring(4, 6);
+            String dd = strData.substring(6, 8);
+            yyyy_MM_dd = yyyy + "-" + mm + "-" + dd;
+        }
+        return yyyy_MM_dd;
+    }
 
-	public static int getMinutest(String begin, String format) {
-		String nowMinutes = getCurDate("HH:mm");
-		long time = compareDateStr("09:00", nowMinutes, "HH:mm");
-		return (int) time;
-	}
+    public static String getdatefor_HH_mm_ss(String strData) {
+        //1529398742830
+        //20180205
+        String HH_mm_ss = "";
+        if (null == strData || strData.length() == 0) {
+            return HH_mm_ss;
+        } else {
+            String HH = strData.substring(0, 2);
+            String mm = strData.substring(2, 4);
+            String ss = strData.substring(4, 6);
+            HH_mm_ss = HH + ":" + mm + ":" + ss;
+        }
+        return HH_mm_ss;
+    }
 
-	/**
-	 * <p>
-	 * Title: addDays
-	 * </p>
-	 * <p>
-	 * Description: ������������
-	 * </p>
-	 * 
-	 * @param days
-	 * @return
-	 */
-	public static Date addDays(Date date, int days) {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		calendar.add(Calendar.DATE, days);
-		return calendar.getTime();
-	}
+    /**
+     * yyyyMMdd
+     *
+     * @return
+     */
+    public static String getdatefor_yyyyMMdd() {
+        Date newdate = new Date();
+        SimpleDateFormat dft = new SimpleDateFormat("yyyyMMdd");
+        String date = dft.format(newdate);
+        return date;
+    }
 
-	/**
-	 * <p>
-	 * Title: addMonths
-	 * </p>
-	 * <p>
-	 * Description: ������������
-	 * </p>
-	 * 
-	 * @param date
-	 * @param months
-	 * @return
-	 */
-	public static Date addMonths(Date date, int months) {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		calendar.add(Calendar.MONTH, months);
-		return calendar.getTime();
-	}
+    /**
+     * yyyyMMdd
+     *
+     * @return
+     */
+    public static String getdatefor_yyyy_MM_dd() {
+        Date newdate = new Date();
+        SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd");
+        String date = dft.format(newdate);
+        return date;
+    }
 
-	/**
-	 * <p>
-	 * Title: getDays
-	 * </p>
-	 * <p>
-	 * Description: ���������������������������������������
-	 * </p>
-	 * 
-	 * @param minDate
-	 * @param maxDate
-	 * @return
-	 */
-	public static int getDays(Date minDate, Date maxDate) {
-		int days = 0;
-		if (null == minDate || null == maxDate)
-			return days;
-		days = (int) ((maxDate.getTime() - minDate.getTime()) / (24 * 60 * 60 * 1000));
-		return days;
-	}
 
-	/**
-	 * ������������ date
-	 * 
-	 * @param longDate ���������
-	 * @return
-	 */
-	public static Date getConversionDateByLong(long longDate) {
-		//1529398742830
-		ZoneId zid = ZoneId.systemDefault();
-		LocalDateTime time = LocalDateTime.ofInstant(Instant.ofEpochMilli(longDate), zid);
-		ZonedDateTime zdt = time.atZone(zid);
-		Date date = Date.from(zdt.toInstant());
-		return date;
-	}
-	
-	/**
-	 * yyyyMMdd ��� yyyy_MM_dd
-	 * 
-	 * @param strData ���������
-	 * @return
-	 */
-	public static String getdatefor_yyyy_MM_dd(String  strData) {
-		//1529398742830
-		//20180205
-		String yyyy_MM_dd="";
-		if (null == strData ||  strData.length()==0) {
-			return yyyy_MM_dd;
-		}else {
-			String yyyy = strData.substring(0, 4);
-			String mm = strData.substring(4, 6);
-			String dd = strData.substring(6, 8);
-			yyyy_MM_dd = yyyy+"-"+mm +"-"+dd;
-		}		
-		return yyyy_MM_dd;
-	}
-	
-	public static String getdatefor_HH_mm_ss(String  strData) {
-		//1529398742830
-		//20180205
-		String HH_mm_ss="";
-		if (null == strData ||  strData.length()==0) {
-			return HH_mm_ss;
-		}else {
-			String HH = strData.substring(0, 2);
-			String mm = strData.substring(2, 4);
-			String ss = strData.substring(4, 6);
-			HH_mm_ss = HH+":"+mm +":"+ss;
-		}		
-		return HH_mm_ss;
-	}
-	
-	/**
-	 * yyyyMMdd
-	 * 
-	 * @return
-	 */
-	public static String getdatefor_yyyyMMdd() {
-		Date newdate = new Date();
-		SimpleDateFormat dft = new SimpleDateFormat("yyyyMMdd");
-		String  date = dft.format(newdate);	
-		return date;
-	}
-	
-	/**
-	 * yyyyMMdd
-	 * 
-	 * @return
-	 */
-	public static String getdatefor_yyyy_MM_dd() {
-		Date newdate = new Date();
-		SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd");
-		String  date = dft.format(newdate);	
-		return date;
-	}
-	
-	
-	
-	public static void main(String[] args) throws InterruptedException {
-		Date date1 = new Date();
-		Thread.sleep(1000);
-		Date date2 = new Date();
-		System.out.println(DateUtils.compareDateStr(date1,date2));
-	}
+    public static void main(String[] args) throws InterruptedException {
+        Date date1 = new Date();
+        Thread.sleep(1000);
+        Date date2 = new Date();
+        System.out.println(DateUtils.compareDateStr(date1, date2));
+    }
 }

--
Gitblit v1.8.0