- 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
广告