org.springframework.format.datetime.joda

## Class JodaTimeContext

- java.lang.Object
- - org.springframework.format.datetime.joda.JodaTimeContext

-     public class JodaTimeContext
      extends Object

  A context that holds user-specific Joda-Time settings such as the user's Chronology (calendar system) and time zone.

  A `null` property value indicate the user has not specified a setting.

  Since:
    3.0
  Author:
    Keith Donald
  See Also:
    `JodaTimeContextHolder`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JodaTimeContext()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Chronology` | `getChronology()` The user's chronology (calendar system), if any.
    `DateTimeFormatter` | `getFormatter(DateTimeFormatter formatter)` Get the DateTimeFormatter with the this context's settings applied to the base `formatter`.
    `DateTimeZone` | `getTimeZone()` The user's timezone, if any.
    `void` | `setChronology(Chronology chronology)` Set the user's chronology.
    `void` | `setTimeZone(DateTimeZone timeZone)` Set the user's timezone.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JodaTimeContext

          public JodaTimeContext()

  - ### Method Detail

    - #### setChronology

          public void setChronology(Chronology chronology)

      Set the user's chronology.

    - #### getChronology

          public Chronology getChronology()

      The user's chronology (calendar system), if any.

    - #### setTimeZone

          public void setTimeZone(DateTimeZone timeZone)

      Set the user's timezone.

    - #### getTimeZone

          public DateTimeZone getTimeZone()

      The user's timezone, if any.

    - #### getFormatter

          public DateTimeFormatter getFormatter(DateTimeFormatter formatter)

      Get the DateTimeFormatter with the this context's settings applied to the base `formatter`.
      Parameters:
        `formatter` - the base formatter that establishes default formatting rules, generally context-independent
      Returns:
        the contextual DateTimeFormatter