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 int
Method to solve problem with thymeleaf if you somehow have java.sql.Timestamp if will not allow call methods for this classstatic String
convertDateToUTC
(Date date) static String
formatDate
(Date date) static String
formatDate
(Date date, String format) static String
formatDate
(Date date, String format, TimeZone timeZone) static String
formatDateAsString
(Date date) static String
formatDateAsString
(Date date, TimeZone timeZone) static String
formatSimpleDate
(Date date) static Date
parseStringToDate
(String dateString) static Date
parseStringToDate
(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)
-