Class FormatUtil
java.lang.Object
org.broadleafcommerce.common.util.FormatUtil
- Author:
- Jeff Fischer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
dateToSting
(Date date, TimeZone timeZone) Use to produce date Strings with a given timezonestatic String
formatDateUsingW3C
(Date date) Use to produce date Strings in the W3C date formatstatic SimpleDateFormat
static SimpleDateFormat
Used with dates in rules since they are not stored as a Timestamp type (and thus not converted to a specific database timezone on a save).
-
Field Details
-
DATE_FORMAT
- See Also:
-
DATE_FORMAT_WITH_TIMEZONE
- See Also:
-
-
Constructor Details
-
FormatUtil
public FormatUtil()
-
-
Method Details
-
getDateFormat
-
getTimeZoneFormat
Used with dates in rules since they are not stored as a Timestamp type (and thus not converted to a specific database timezone on a save). In order to provide accurate information, the timezone must also be preserved in the MVEL rule expression- Returns:
-
formatDateUsingW3C
Use to produce date Strings in the W3C date format- Parameters:
date
-- Returns:
- Throws:
DatatypeConfigurationException
-
dateToSting
Use to produce date Strings with a given timezone- Parameters:
date
- incoming date as java.util.DatetimeZone
- timezone to correctly represent date information- Returns:
- string of date
-