Package com.logicaldoc.util.time
Class DateUtil
java.lang.Object
com.logicaldoc.util.time.DateUtil
Utility methods to handle dates
- Since:
- 8.6.1
- Author:
- Marco Meschieri - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Formats a date using the ISO formatyyyy-MM-dd HH:mm:ss Z
static String
formatWithMillis
(Date date) Formats a date using the ISO formatyyyy-MM-dd HH:mm:ss.SSS Z
static Date
Formats a date using one of the ISO formats.static Date
truncateToDay
(Date date)
-
Method Details
-
format
Formats a date using the ISO formatyyyy-MM-dd HH:mm:ss Z
- Parameters:
date
- the date to format- Returns:
- the formatted date
-
formatWithMillis
Formats a date using the ISO formatyyyy-MM-dd HH:mm:ss.SSS Z
- Parameters:
date
- the date to format- Returns:
- the formatted date
-
parse
Formats a date using one of the ISO formats.- Parameters:
formattedDate
- the string to parse- Returns:
- the parsed date
-
truncateToDay
-