Class BLCDateUtils
java.lang.Object
org.broadleafcommerce.common.util.BLCDateUtils
Convenience class to facilitate date manipulation.
- Author:
- Chris Kittrell (ckittrell)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intMethod to solve problem with thymeleaf if you somehow have java.sql.Timestamp if will not allow call methods for this classstatic StringconvertDateToUTC(Date date) static StringformatDate(Date date) static StringformatDate(Date date, String format) static StringformatDate(Date date, String format, TimeZone timeZone) static StringformatDateAsString(Date date) static StringformatDateAsString(Date date, TimeZone timeZone) static StringformatSimpleDate(Date date) static DateparseStringToDate(String dateString) static DateparseStringToDate(String dateString, String dateFormat)
-
Field Details
-
SIMPLE_DATE_FORMAT
- See Also:
-
DEFAULT_DATE_FORMAT
- See Also:
-
DISPLAY_DATE_FORMAT
- See Also:
-
-
Constructor Details
-
BLCDateUtils
public BLCDateUtils()
-
-
Method Details
-
convertDateToUTC
-
formatDateAsString
-
formatDateAsString
-
parseStringToDate
-
parseStringToDate
-
formatSimpleDate
-
formatDate
-
formatDate
-
formatDate
-
compareTo
Method to solve problem with thymeleaf if you somehow have java.sql.Timestamp if will not allow call methods for this class- Parameters:
date1- - the first date to comparedate2- - the second date to compare- Returns:
- result of date1.compareTo(date2)
-