クラス
java.time.ZoneIdの使用
-
ZoneIdを使用しているパッケージ パッケージ 説明 java.time 日付、時間、インスタント、デュレーションのメインAPI。java.time.chrono デフォルトのISO暦以外の暦体系の汎用API。java.time.format 日付と時間を出力し、解析するクラスを提供します。java.time.temporal フィールドと単位を使用した日時へのアクセス、および日時アジャスタ。java.util コレクション・フレームワーク、国際化サポート・クラス、サービス・ローダー、プロパティ、乱数生成、文字列解析とスキャン・クラス、Base64エンコーディングとデコード、ビット配列、およびその他のユーティリティ・クラスが含まれています。 -
-
java.timeでのZoneIdの使用
java.timeでのZoneIdのサブクラス 修飾子と型 クラス 説明 classZoneOffsetグリニッジ/UTCからのタイムゾーンのオフセット(+02:00など)。ZoneIdを返すjava.timeのメソッド 修飾子と型 メソッド 説明 static ZoneIdZoneId. from(TemporalAccessor temporal)時間的オブジェクトからZoneIdのインスタンスを取得します。abstract ZoneIdClock. getZone()日付と時間を作成するために使用されるタイムゾーンを取得します。ZoneIdZonedDateTime. getZone()Europe/Parisなど、タイムゾーンを取得します。ZoneIdZoneId. normalized()タイムゾーンIDを正規化し、可能な場合はZoneOffsetを返します。static ZoneIdZoneId. of(String zoneId)IDからZoneIdのインスタンスを取得し、IDが有効で使用できることを確認します。static ZoneIdZoneId. of(String zoneId, Map<String,String> aliasMap)IDとZoneIdのインスタンスを取得し、別名マップを使用して標準ゾーンIDを補足します。static ZoneIdZoneId. ofOffset(String prefix, ZoneOffset offset)ZoneIdのインスタンスを取得して、オフセットをラップします。static ZoneIdZoneId. systemDefault()システム・デフォルト・タイムゾーンを取得します。ZoneId型のパラメータを持つjava.timeのメソッド 修飾子と型 メソッド 説明 ZonedDateTimeLocalDate. atStartOfDay(ZoneId zone)タイムゾーンのルールに従って、この日付のもっとも早い有効な時間からゾーン付きの日付/時間を返します。ZonedDateTimeInstant. atZone(ZoneId zone)このインスタントとタイムゾーンを組み合わせてZonedDateTimeを作成します。ZonedDateTimeLocalDateTime. atZone(ZoneId zone)この日付/時間をタイムゾーンと組み合せてZonedDateTimeを作成します。ZonedDateTimeOffsetDateTime. atZoneSameInstant(ZoneId zone)結果に同じインスタントが含まれるようにしながら、この日付/時間をタイムゾーンと組み合わせてZonedDateTimeを作成します。ZonedDateTimeOffsetDateTime. atZoneSimilarLocal(ZoneId zone)同じローカルの日付と時間を保持するようにしながら、この日付/時間をタイムゾーンと組み合わせてZonedDateTimeを作成します。static ClockClock. fixed(Instant fixedInstant, ZoneId zone)常に同じインスタントを返すクロックを取得します。static LocalDateLocalDate. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の日付を取得します。static LocalDateTimeLocalDateTime. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の日付/時間を取得します。static LocalTimeLocalTime. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の時間を取得します。static MonthDayMonthDay. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の月-日を取得します。static OffsetDateTimeOffsetDateTime. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の日付/時間を取得します。static OffsetTimeOffsetTime. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の時間を取得します。static YearYear. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の年を取得します。static YearMonthYearMonth. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の年-月を取得します。static ZonedDateTimeZonedDateTime. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の日付/時間を取得します。static ZonedDateTimeZonedDateTime. of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneId zone)年、月、日、時、分、秒、ナノ秒、およびタイムゾーンからZonedDateTimeのインスタンスを取得します。static ZonedDateTimeZonedDateTime. of(LocalDate date, LocalTime time, ZoneId zone)ローカルの日付と時間からZonedDateTimeのインスタンスを取得します。static ZonedDateTimeZonedDateTime. of(LocalDateTime localDateTime, ZoneId zone)ローカル日付/時間からZonedDateTimeのインスタンスを取得します。static LocalDateLocalDate. ofInstant(Instant instant, ZoneId zone)InstantとゾーンIDからLocalDateのインスタンスを取得します。static LocalDateTimeLocalDateTime. ofInstant(Instant instant, ZoneId zone)InstantおよびゾーンIDからLocalDateTimeのインスタンスを取得します。static LocalTimeLocalTime. ofInstant(Instant instant, ZoneId zone)InstantとゾーンIDからLocalTimeのインスタンスを取得します。static OffsetDateTimeOffsetDateTime. ofInstant(Instant instant, ZoneId zone)InstantおよびゾーンIDからOffsetDateTimeのインスタンスを取得します。static OffsetTimeOffsetTime. ofInstant(Instant instant, ZoneId zone)InstantおよびゾーンIDからOffsetTimeのインスタンスを取得します。static ZonedDateTimeZonedDateTime. ofInstant(Instant instant, ZoneId zone)InstantからZonedDateTimeのインスタンスを取得します。static ZonedDateTimeZonedDateTime. ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)ローカル日付/時間とオフセットを組み合せることで形成されるインスタントからZonedDateTimeのインスタンスを取得します。static ZonedDateTimeZonedDateTime. ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferredOffset)可能であれば優先オフセットを使用して、ローカル日付/時間からZonedDateTimeのインスタンスを取得します。static ZonedDateTimeZonedDateTime. ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)ローカル日付/時間、オフセット、およびゾーンIDの組合せを厳密に検証して、ZonedDateTimeのインスタンスを取得します。static ClockClock. system(ZoneId zone)最高の利用可能なシステム・クロックを使用して現在の瞬間を返すクロックを取得します。static ClockClock. tickMillis(ZoneId zone)最高の利用可能なシステム・クロックを使用して、ミリ秒単位で現在の時刻を返すクロックを取得します。static ClockClock. tickMinutes(ZoneId zone)最高の利用可能なシステム・クロックを使用して、分単位で現在の時刻を返す時計を取得します。static ClockClock. tickSeconds(ZoneId zone)最高の利用可能なシステム・クロックを使用して、秒単位で現在のチックを返すクロックを取得します。abstract ClockClock. withZone(ZoneId zone)別のタイムゾーンを使って、このクロックのコピーを返します。ZonedDateTimeZonedDateTime. withZoneSameInstant(ZoneId zone)インスタントを保持したまま、別のタイムゾーンを使ってこの日付/時間のコピーを返します。ZonedDateTimeZonedDateTime. withZoneSameLocal(ZoneId zone)可能であればローカル日付/時間を保持したまま、別のタイムゾーンを使って、この日付/時間のコピーを返します。 -
java.time.chronoでのZoneIdの使用
ZoneIdを返すjava.time.chronoのメソッド 修飾子と型 メソッド 説明 ZoneIdChronoZonedDateTime. getZone()「Europe/Paris」などのゾーンIDを取得します。ZoneId型のパラメータを持つjava.time.chronoのメソッド 修飾子と型 メソッド 説明 ChronoZonedDateTime<D>ChronoLocalDateTime. atZone(ZoneId zone)この時間をタイムゾーンと組み合わせて、ChronoZonedDateTimeを作成します。default ChronoLocalDateChronology. dateNow(ZoneId zone)指定されたタイムゾーンのシステム・クロックからこの暦の現在のローカル日付を取得します。LocalDateIsoChronology. dateNow(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在のISO暦のローカル日付を取得します。static HijrahDateHijrahDate. now(ZoneId zone)指定されたタイムゾーンのイスラム・ウム・アルクラ暦の現在のHijrahDateを取得します。static JapaneseDateJapaneseDate. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在のJapaneseDateを取得します。static MinguoDateMinguoDate. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在のMinguoDateを取得します。static ThaiBuddhistDateThaiBuddhistDate. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在のThaiBuddhistDateを取得します。ChronoZonedDateTime<D>ChronoZonedDateTime. withZoneSameInstant(ZoneId zone)インスタントを保持したまま、別のタイムゾーンを使ってこの日付/時間のコピーを返します。ChronoZonedDateTime<D>ChronoZonedDateTime. withZoneSameLocal(ZoneId zone)可能であればローカル日付/時間を保持したまま、別のタイムゾーンを使って、この日付/時間のコピーを返します。default ChronoZonedDateTime<? extends ChronoLocalDate>Chronology. zonedDateTime(Instant instant, ZoneId zone)Instantからこの暦でChronoZonedDateTimeを取得します。ZonedDateTimeIsoChronology. zonedDateTime(Instant instant, ZoneId zone)Instantからこの暦でISOのゾーン付きの日付/時間を取得します。 -
java.time.formatでのZoneIdの使用
ZoneIdを返すjava.time.formatのメソッド 修飾子と型 メソッド 説明 ZoneIdDateTimeFormatter. getZone()書式設定時に使用されるオーバーライド・ゾーンを取得します。ZoneId型のパラメータを持つjava.time.formatのメソッド 修飾子と型 メソッド 説明 DateTimeFormatterDateTimeFormatter. withZone(ZoneId zone)新しいオーバーライドゾーンを使って、このフォーマッタのコピーを返します。ZoneId型の型引数を持つjava.time.formatのメソッド・パラメータ 修飾子と型 メソッド 説明 DateTimeFormatterBuilderDateTimeFormatterBuilder. appendGenericZoneText(TextStyle textStyle, Set<ZoneId> preferredZones)'太平洋時間'などの汎用タイムゾーン名をフォーマッタに追加します。DateTimeFormatterBuilderDateTimeFormatterBuilder. appendZoneText(TextStyle textStyle, Set<ZoneId> preferredZones)「英国夏時間」などのタイムゾーン名をフォーマッタに追加します。 -
java.time.temporalでのZoneIdの使用
ZoneId型の引数を持つ型を返すjava.time.temporalのメソッド 修飾子と型 メソッド 説明 static TemporalQuery<ZoneId>TemporalQueries. zone()ZoneOffsetにフォール・バックする、ZoneIdの厳密でないクエリーです。static TemporalQuery<ZoneId>TemporalQueries. zoneId()ZoneIdの厳密な問合せ。 -
java.utilでのZoneIdの使用
ZoneIdを返すjava.utilのメソッド 修飾子と型 メソッド 説明 ZoneIdTimeZone. toZoneId()このTimeZoneオブジェクトをZoneIdに変換します。ZoneId型のパラメータを持つjava.utilのメソッド 修飾子と型 メソッド 説明 static TimeZoneTimeZone. getTimeZone(ZoneId zoneId)指定されたzoneIdのTimeZoneを取得します。
-