public class JodaTimeContext
extends java.lang.Object
null
プロパティ値は、ユーザーが設定を指定していないことを示します。
JodaTimeContextHolder
コンストラクターと説明 |
---|
JodaTimeContext() |
修飾子と型 | メソッドと説明 |
---|---|
Chronology | getChronology() ユーザーの年代順(カレンダーシステム)を返します(ある場合)。 |
DateTimeFormatter | getFormatter(DateTimeFormatter formatter) このコンテキストの設定がベース formatter に適用された DateTimeFormatter を取得します。 |
DateTimeZone | getTimeZone() もしあれば、ユーザーのタイムゾーンを返します。 |
void | setChronology(Chronology chronology) ユーザーの年表(カレンダーシステム)を設定します。 |
void | setTimeZone(DateTimeZone timeZone) ユーザーのタイムゾーンを設定します。 |
public void setChronology(@Nullable Chronology chronology)
@Nullable public Chronology getChronology()
public void setTimeZone(@Nullable DateTimeZone timeZone)
または、LocaleContextHolder
に TimeZoneAwareLocaleContext
を設定します。ここで設定が指定されていない場合、このコンテキストクラスはロケールコンテキストのチェックにフォールバックします。
@Nullable public DateTimeZone getTimeZone()
public DateTimeFormatter getFormatter(DateTimeFormatter formatter)
formatter
に適用された DateTimeFormatter を取得します。formatter
- デフォルトのフォーマットルールを確立する基本フォーマッタ。通常はコンテキストに依存しません