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