public class

JodaTimeContext

extends Object
java.lang.Object
   ↳ org.springframework.format.datetime.joda.JodaTimeContext

Class Overview

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.

Summary

Public Constructors
JodaTimeContext()
Public Methods
Chronology getChronology()
The user's chronology (calendar system).
DateTimeFormatter getFormatter(DateTimeFormatter formatter)
Gets the Formatter with the this context's settings applied to the base formatter.
DateTimeZone getTimeZone()
The user's timezone.
void setChronology(Chronology chronology)
Set the user's chronology.
void setTimeZone(DateTimeZone timeZone)
Set the user's timezone.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JodaTimeContext ()

Public Methods

public Chronology getChronology ()

The user's chronology (calendar system). Null if not specified.

public DateTimeFormatter getFormatter (DateTimeFormatter formatter)

Gets the Formatter 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 context DateTimeFormatter

public DateTimeZone getTimeZone ()

The user's timezone. Null if not specified.

public void setChronology (Chronology chronology)

Set the user's chronology.

public void setTimeZone (DateTimeZone timeZone)

Set the user's timezone.