- java.time 包類
- java.time - 主頁
- java.time - Clock
- java.time - Duration
- java.time - Instant
- java.time - LocalDate
- java.time - LocalDateTime
- java.time - LocalTime
- java.time - MonthDay
- java.time - OffsetDateTime
- java.time - OffsetTime
- java.time - Period
- java.time - Year
- java.time - YearMonth
- java.time - ZonedDateTime
- java.time - ZoneId
- java.time - ZoneOffset
- java.time 包列舉
- java.time - Month
- java.time 有用資源
- java.time - 討論
java.time.Period.getChronology() 方法示例
描述
java.time.Period.getChronology() 方法獲取該時間的年表,即 ISO 日曆系統。
宣告
下面是 java.time.Period.getChronology() 方法的宣告。
public IsoChronology getChronology()
返回值
返回 ISO 年表,非空
示例
以下示例展示了 java.time.Period.getChronology() 方法的用法。
package com.tutorialspoint;
import java.time.Period;
public class PeriodDemo {
public static void main(String[] args) {
Period period = Period.of(10,5,2);
System.out.println(period.getChronology());
}
}
讓我們編譯並執行以上程式,將得到以下結果 −
ISO
廣告