Package: org.grails.plugins.web

## [Groovy] Interface GrailsTagDateHelper

- An interface for defining behavior that Grails tags require surrounding dates

  Authors:
    James Kleeh
  Since:
    3.2.1

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `java.util.GregorianCalendar` | `buildCalendar(java.lang.Object date)` Creates a GregorianCalendar based off of the date object.
    `java.lang.String` | `format(java.lang.Object formatter, java.lang.Object date)` Formats a given date
    `java.lang.Object` | `getDateFormat(java.lang.String style, java.lang.Object timeZone, java.util.Locale locale)` Retrieve a date format object without time to be passed to the format method
    `java.lang.Object` | `getDateTimeFormat(java.lang.String dateStyle, java.lang.String timeStyle, java.lang.Object timeZone, java.util.Locale locale)` Retrieve a date format object with time to be passed to the format method
    `java.lang.Object` | `getFormatFromPattern(java.lang.String format, java.lang.Object timeZone, java.util.Locale locale)` Retrieve a date format object to be passed to the format method
    `java.lang.Object` | `getTimeFormat(java.lang.String style, java.lang.Object timeZone, java.util.Locale locale)` Retrieve a time format object without time to be passed to the format method
    `java.lang.Object` | `getTimeZone(java.lang.Object timeZone)` Retrieve a time zone object from a parameter
    `java.lang.Boolean` | `supportsDatePicker(java.lang.Class clazz)` @param clazz The type of date to be used in a date picker

- - ### Method Detail

    - #### java.util.GregorianCalendar buildCalendar(java.lang.Object date)

      Creates a GregorianCalendar based off of the date object. This should only get called if supportsDatePicker returns true.

      Parameters:
        `date` - The date to convert
      Returns:
        A GregorianCalendar instance

    - #### java.lang.String format(java.lang.Object formatter, java.lang.Object date)

      Formats a given date

      Parameters:
        `formatter` - The formatter retrieved from any one of these methods: getFormatFromPattern, getDateFormat, getTimeFormat, getDateTimeFormat
        `date` - The date to be formatted
      Returns:
        The string representation of the date

    - #### java.lang.Object getDateFormat(java.lang.String style, java.lang.Object timeZone, java.util.Locale locale)

      Retrieve a date format object without time to be passed to the format method

      Parameters:
        `style` - The string type of format //FULL,LONG,MEDIUM,SHORT
        `timeZone` - The timeZone retrieved from getTimeZone
        `locale` - The locale

    - #### java.lang.Object getDateTimeFormat(java.lang.String dateStyle, java.lang.String timeStyle, java.lang.Object timeZone, java.util.Locale locale)

      Retrieve a date format object with time to be passed to the format method

      Parameters:
        `dateStyle` - The string type of date format //FULL,LONG,MEDIUM,SHORT
        `timeStyle` - The string type of time format //FULL,LONG,MEDIUM,SHORT
        `timeZone` - The timeZone retrieved from getTimeZone
        `locale` - The locale

    - #### java.lang.Object getFormatFromPattern(java.lang.String format, java.lang.Object timeZone, java.util.Locale locale)

      Retrieve a date format object to be passed to the format method

      Parameters:
        `format` - The string format pattern
        `timeZone` - The timeZone retrieved from getTimeZone
        `locale` - The locale

    - #### java.lang.Object getTimeFormat(java.lang.String style, java.lang.Object timeZone, java.util.Locale locale)

      Retrieve a time format object without time to be passed to the format method

      Parameters:
        `style` - The string type of format //FULL,LONG,MEDIUM,SHORT
        `timeZone` - The timeZone retrieved from getTimeZone
        `locale` - The locale

    - #### java.lang.Object getTimeZone(java.lang.Object timeZone)

      Retrieve a time zone object from a parameter

      Parameters:
        timeZone
      Returns:
        a time zone to be passed to other methods

    - #### java.lang.Boolean supportsDatePicker(java.lang.Class clazz)

      Parameters:
        `clazz` - The type of date to be used in a date picker
      Returns:
        Whether or not the date is supported by the implementation