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 StringFormats a date using the ISO formatyyyy-MM-dd HH:mm:ss Zstatic StringformatWithMillis(Date date) Formats a date using the ISO formatyyyy-MM-dd HH:mm:ss.SSS Zstatic DateFormats a date using one of the ISO formats.static DatetruncateToDay(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
-