public class DateUtils extends Object
| Constructor and Description |
|---|
DateUtils() |
public SimpleDateFormat getStandardSimpleDateFormat()
public SimpleDateFormat getStandardSimpleDateFormatT()
public SimpleDateFormat getStandardSimpleTimeFormat()
public SimpleDateFormat getStandardSimpleDateFormatTZ()
public java.time.format.DateTimeFormatter getStandarDataTimeFormat()
public java.time.format.DateTimeFormatter getStandarDateTimeFormat()
public java.time.format.DateTimeFormatter getStandarDayTimeFormat()
public static String formatTimestampToStandardDateString(Timestamp timestamp)
timestamp - 需要格式化的Timestamppublic static String formatTimestampToStandardDateStringTZ(Timestamp timestamp)
timestamp - 需要格式化的Timestamppublic static Timestamp parseStandardDateStringToTimestamp(String date) throws ParseException
date - 日期字符串ParseException - 解析错误public static String formatNowToStandardDateFormat()
public static Timestamp parseStandardDateStringTToTimestamp(String date) throws ParseException
date - 日期字符串ParseException - 解析错误public static String formatTimestampToStandardDateStringT(Timestamp timestamp)
timestamp - 时间戳public static String formatLocalDateTimeToStandardDateString(java.time.LocalDateTime timestamp)
timestamp - 时间戳public static Timestamp parseDateStringToTimestamp(String date) throws ParseException
date - 日期字符串ParseException - 解析错误public static String computeDateString(String date, int field, int value) throws ParseException
date - 日期字符串field - 操作什么 Calendarvalue - 值ParseException - 解析错误public static Date getFirstDayMonth()
public static String getFirstDayMonthString()
public static Date parseDateToCustom(String date, String format) throws ParseException
ParseExceptionpublic static boolean timeIsInRange(Date date, String startTime, String endTime, String pattern)
public static String formatNowToStandardDateString()
public static String formatNowToStandardDateStringT()
public static String formatToday()
public static int getLastDateOfMonth(int month)
Copyright © 2021 Clouds Studio. All rights reserved.