DateTimeContext.
org.springframework.context.i18n.LocaleContextHolder
| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DateTimeContext | Returns: the current DateTimeContext, ornull if noneReturn the DateTimeContext associated with the current thread, if any. |
| public static DateTimeFormatter | Returns: the user-specific DateTimeFormatterthe base formatter that establishes default formatting rules
(generally user independent) formatter, Locale the current user locale (may be locale)null if not known)Obtain a DateTimeFormatter with user-specific settings applied to the given base formatter. |
| public static void | |
| public static void | setDateTimeContext(DateTimeContext
the current DateTimeContext,
or dateTimeContext)null to reset the thread-bound contextAssociate the given DateTimeContext with the current thread. |
| dateTimeContextHolder | back to summary |
|---|---|
| private static final ThreadLocal<DateTimeContext> dateTimeContextHolder | |
| DateTimeContextHolder | back to summary |
|---|---|
| private DateTimeContextHolder() | |
| getDateTimeContext | back to summary |
|---|---|
| public static DateTimeContext getDateTimeContext() Return the DateTimeContext associated with the current thread, if any.
| |
| getFormatter | back to summary |
|---|---|
| public static DateTimeFormatter getFormatter(DateTimeFormatter formatter, Locale locale) Obtain a DateTimeFormatter with user-specific settings applied to the given base formatter.
| |
| resetDateTimeContext | back to summary |
|---|---|
| public static void resetDateTimeContext() Reset the DateTimeContext for the current thread. | |
| setDateTimeContext | back to summary |
|---|---|
| public static void setDateTimeContext(DateTimeContext dateTimeContext) Associate the given DateTimeContext with the current thread.
| |