public final class JodaTimeContextHolder
extends java.lang.Object
JodaTimeContext
with user-specific Joda-Time settings.LocaleContextHolder| Constructor and Description |
|---|
JodaTimeContextHolder() |
| Modifier and Type | Method and Description |
|---|---|
static DateTimeFormatter |
getFormatter(DateTimeFormatter formatter,
java.util.Locale locale)
Obtain a DateTimeFormatter with user-specific settings applied to the given base Formatter.
|
static JodaTimeContext |
getJodaTimeContext()
Return the JodaTimeContext associated with the current thread, if any.
|
static void |
resetJodaTimeContext()
Reset the JodaTimeContext for the current thread.
|
static void |
setJodaTimeContext(JodaTimeContext jodaTimeContext)
Associate the given JodaTimeContext with the current thread.
|
public static void resetJodaTimeContext()
public static void setJodaTimeContext(JodaTimeContext jodaTimeContext)
jodaTimeContext - the current JodaTimeContext,
or null to reset the thread-bound contextpublic static JodaTimeContext getJodaTimeContext()
null if nonepublic static DateTimeFormatter getFormatter(DateTimeFormatter formatter, java.util.Locale locale)
formatter - the base formatter that establishes default formatting rules
(generally user independent)locale - the current user locale (may be null if not known)