spring-framework / org.springframework.format.datetime.joda / JodaTimeContextHolder

JodaTimeContextHolder

class JodaTimeContextHolder

A holder for a thread-local JodaTimeContext with user-specific Joda-Time settings.

Author
Keith Donald

Author
Juergen Hoeller

Since
3.0

See Also
org.springframework.context.i18n.LocaleContextHolder

Constructors

<init>

JodaTimeContextHolder()

A holder for a thread-local JodaTimeContext with user-specific Joda-Time settings.

Functions

getFormatter

static fun getFormatter(formatter: DateTimeFormatter, locale: Locale): DateTimeFormatter

Obtain a DateTimeFormatter with user-specific settings applied to the given base Formatter.

getJodaTimeContext

static fun getJodaTimeContext(): JodaTimeContext

Return the JodaTimeContext associated with the current thread, if any.

resetJodaTimeContext

static fun resetJodaTimeContext(): Unit

Reset the JodaTimeContext for the current thread.

setJodaTimeContext

static fun setJodaTimeContext(jodaTimeContext: JodaTimeContext): Unit

Associate the given JodaTimeContext with the current thread.