Class CmsJspInstanceDateBean.CmsDateFormatOption

java.lang.Object
org.opencms.jsp.util.CmsJspInstanceDateBean.CmsDateFormatOption
Enclosing class:
CmsJspInstanceDateBean

Formatting options for dates.
  • Constructor Details

    • CmsDateFormatOption

      public CmsDateFormatOption(String configString, Locale locale) throws IllegalArgumentException
      Create a new date format option. Examples (for date 19/06/82 11:17):
      • "dd/MM/yy"
        • formatDate: "19/06/82"
        • formatTime: ""
        • formatDateTime: "19/06/82"
      • "dd/MM/yy|hh:mm"
        • formatDate: "19/06/82"
        • formatTime: "11:17"
        • formatDateTime: "19/06/82 11:17"
      • "dd/MM/yy|hh:mm|dd/MM/yy - hh:mm"
        • formatDate: "19/06/82"
        • formatTime: "11:17"
        • formatDateTime: "19/06/82 - 11:17"
      Parameters:
      configString - the configuration string, should be structured as "datePattern|timePattern|dateTimePattern", where only datePattern is mandatory.
      locale - the locale to use for printing days of week, month names etc.
      Throws:
      IllegalArgumentException - thrown if the configured patterns are invalid.