org.springframework.format.datetime.joda

## 类 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.

  从以下版本开始:
    3.0
  作者:
    Keith Donald
  另请参阅:
    `JodaTimeContextHolder`

- - ### 构造器概要

    构造器
    构造器和说明
    `JodaTimeContext()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `Chronology` | `getChronology()` Return 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()` Return the user's time zone, if any.
    `void` | `setChronology(Chronology chronology)` Set the user's chronology (calendar system).
    `void` | `setTimeZone(DateTimeZone timeZone)` Set the user's time zone.

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### JodaTimeContext

          public JodaTimeContext()

  - ### 方法详细资料

    - #### setChronology

          public void setChronology(@Nullable
                                    Chronology chronology)

      Set the user's chronology (calendar system).

    - #### getChronology

          @Nullable
          public Chronology getChronology()

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

    - #### setTimeZone

          public void setTimeZone(@Nullable
                                  DateTimeZone timeZone)

      Set the user's time zone.

      Alternatively, set a `TimeZoneAwareLocaleContext` on `LocaleContextHolder`. This context class will fall back to checking the locale context if no setting has been provided here.

      另请参阅:
        `LocaleContextHolder.getTimeZone()`, `LocaleContextHolder.setLocaleContext(org.springframework.context.i18n.LocaleContext)`

    - #### getTimeZone

          @Nullable
          public DateTimeZone getTimeZone()

      Return the user's time zone, if any.

    - #### getFormatter

          public DateTimeFormatter getFormatter(DateTimeFormatter formatter)

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