软件包 | 描述 |
---|---|
java.time |
日期、时间、时刻主要的API,和持续时间。
|
Modifier and Type | Method and Description |
---|---|
static MonthDay |
MonthDay.from(TemporalAccessor temporal)
获得
MonthDay 实例从一个时空对象。
|
static MonthDay |
MonthDay.now()
从默认时区中的系统时钟中获得当前的月日。
|
static MonthDay |
MonthDay.now(Clock clock)
从指定的时钟中获得当前的月日。
|
static MonthDay |
MonthDay.now(ZoneId zone)
从指定时区中的系统时钟中获得当前的月日。
|
static MonthDay |
MonthDay.of(int month, int dayOfMonth)
获得
MonthDay 实例。
|
static MonthDay |
MonthDay.of(Month month, int dayOfMonth)
获得
MonthDay 实例。
|
static MonthDay |
MonthDay.parse(CharSequence text)
获得
MonthDay 实例从一个文本字符串,如
--12-03 。
|
static MonthDay |
MonthDay.parse(CharSequence text, DateTimeFormatter formatter)
获得
MonthDay 实例从使用特定格式的文本字符串。
|
MonthDay |
MonthDay.with(Month month)
返回一份本
MonthDay 与月的年变化。
|
MonthDay |
MonthDay.withDayOfMonth(int dayOfMonth)
返回一份本
MonthDay 与月改变的一天。
|
MonthDay |
MonthDay.withMonth(int month)
返回一份本
MonthDay 与月的年变化。
|
Modifier and Type | Method and Description |
---|---|
LocalDate |
Year.atMonthDay(MonthDay monthDay)
结合今年一个月一天创造一个
LocalDate 。
|
int |
MonthDay.compareTo(MonthDay other)
把这个月天比较到另一个月天。
|
boolean |
MonthDay.isAfter(MonthDay other)
是这个月天之后指定的一个月天。
|
boolean |
MonthDay.isBefore(MonthDay other)
这是一个月前的一天。
|
boolean |
Year.isValidMonthDay(MonthDay monthDay)
检查本月日是否有效。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.