Class FormatUtil

java.lang.Object
org.broadleafcommerce.common.util.FormatUtil

public class FormatUtil extends Object
Author:
Jeff Fischer
  • Field Details

  • Constructor Details

    • FormatUtil

      public FormatUtil()
  • Method Details

    • getDateFormat

      public static SimpleDateFormat getDateFormat()
    • getTimeZoneFormat

      public static SimpleDateFormat 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

      public static String formatDateUsingW3C(Date date)
      Use to produce date Strings in the W3C date format
      Parameters:
      date -
      Returns:
      Throws:
      DatatypeConfigurationException
    • dateToSting

      public static String dateToSting(Date date, TimeZone timeZone)
      Use to produce date Strings with a given timezone
      Parameters:
      date - incoming date as java.util.Date
      timeZone - timezone to correctly represent date information
      Returns:
      string of date