public class DateUtils extends Object
限定符和类型 | 字段和说明 |
---|---|
static String |
DATE_FORMAT_10 |
static String |
DATE_FORMAT_14 |
static String |
DATE_FORMAT_17 |
static String |
DATE_FORMAT_19 |
static String |
DATE_FORMAT_19_FORWARD_SLASH |
限定符和类型 | 方法和说明 |
---|---|
static String |
format(Date date)
Format date
yyyy-MM-dd HH:mm:ss
|
static String |
format(Date date,
String dateFormat)
Format date
|
static boolean |
isADateFormat(Integer formatIndex,
String formatString)
Determine if it is a date format.
|
static boolean |
isADateFormatUncached(Integer formatIndex,
String formatString)
Determine if it is a date format.
|
static boolean |
isInternalDateFormat(int format)
Given a format ID this will check whether the format represents an internal excel date format or not.
|
static Date |
parseDate(String dateString)
convert string to date
|
static Date |
parseDate(String dateString,
String dateFormat)
convert string to date
|
static void |
removeThreadLocalCache() |
public static Date parseDate(String dateString, String dateFormat) throws ParseException
dateString
- dateFormat
- ParseException
public static Date parseDate(String dateString) throws ParseException
dateString
- ParseException
public static String format(Date date, String dateFormat)
date
- dateFormat
- public static boolean isADateFormat(Integer formatIndex, String formatString)
formatIndex
- formatString
- public static boolean isADateFormatUncached(Integer formatIndex, String formatString)
formatIndex
- formatString
- public static boolean isInternalDateFormat(int format)
public static void removeThreadLocalCache()
Copyright © 2018–2021 Alibaba Group. All rights reserved.