java.time.MonthDay 类表示ISO-8601日历系统中的月 - 日,例如 - 12-03.
以下是 java.time.MonthDay class :
public final class MonthDay extends Object implements TemporalAccessor, TemporalAdjuster, Comparable<MonthDay>, Serializable
Sr .No. | 方法&描述 |
---|---|
1 | Temporal adjustInto(Temporal temporal) 调整指定的时间对象以包含此月 - 日. |
2 | LocalDate atYear(int year) 将此月 - 日与一年合并以创建LocalDate. |
3 | int compareTo(MonthDay other) 比较这个月 - 日与另一个月 - |
4 | boolean equals(Object obj) 检查这个月 - 日是否等于另一个月 - |
5 | String format(DateTimeFormatter formatter) 使用指定的格式化程序格式化本月 - |
6 | static MonthDay from(TemporalAccessor temporal) 获取实例来自临时对象的MonthDay. |
7 | int get(TemporalField field) 从本月获取指定字段的值 - day as int. |
8 | int getDayOfMonth() 获取日期字段. |
9 | long getLong(TemporalField field) 从此时间开始获取指定字段的值为long. |
10 | Month getMonth() 使用月枚举获取月份字段. |
11 | int getMonthValue () 获取1到12之间的年份字段. |
12 | int hashCode() 这个月 - 日的哈希码. |
13 | boolean isAfter(MonthDay other) 检查这是否月日是一个指定的月 - 日. |
14 | boolean isBefore(MonthDay other) 检查此月日是否在指定月份之前-day. |
15 | boolean isSupported(TemporalField field) 检查指定的字段是否受支持. |
16 | boolean isSupported(TemporalUnit unit) 检查指定的单位是否受支持. |
17 | boolean isValidYear (int year) 检查这个月的年份是否有效. |
18 | static MonthDay now() 从默认时区中的系统时钟获取当前时间. |
19 | static MonthDay now(Clock clock) 从指定的时钟获得当前时间. |
20 | static MonthDay now(ZoneId zone) 从指定时区的系统时钟获得当前时间. |
21 | static MonthDay of(int month, int dayOfMonth) 获得MonthDay的实例. |
22 | static MonthDay of(Month month, int dayOfMonth) 获取MonthDay的实例. |
23 | static MonthDay parse(CharSequence text) 从文本字符串中获取MonthDay实例,例如--12-03. |
24 | static MonthDay parse(CharSequence text,DateTimeFormatter formatter) 使用特定的格式化程序从文本字符串中获取MonthDay的实例. |
25 | <R> R query(TemporalQuery<R> query) 使用指定的查询查询此次. |
26 | ValueRange range(TemporalField field) 获取指定字段的有效值范围. |
27 | String toString() 将此日期输出为字符串,例如--12-03. |
28 | MonthDay with(Month month) 返回每月更改的月份日的副本. |
29 | MonthDay withDayOfMonth(int dayOfMonth) 返回ac这个月的日期和日期的变化. |
30 | MonthDay withMonth(int month) 返回此副本月日变更年月. |
此类继承以下类中的方法 :
Java.lang.Object