MonthDay (Java SE 26 & JDK 26)
- All Implemented Interfaces:
Serializable, Comparable<MonthDay>, TemporalAccessor, TemporalAdjuster
-
Method Summary
Adjusts the specified temporal object to have this month-day.
atYear(int year) Combines this month-day with a year to create a
LocalDate.intCompares this month-day to another month-day.
booleanChecks if this month-day is equal to another month-day.
Formats this month-day using the specified formatter.
Obtains an instance of
MonthDayfrom a temporal object.intGets the value of the specified field from this month-day as an
int.intGets the day-of-month field.
longGets the value of the specified field from this month-day as a
long.getMonth()Gets the month-of-year field using the
Monthenum.intGets the month-of-year field from 1 to 12.
inthashCode()A hash code for this month-day.
booleanChecks if this month-day is after the specified month-day.
booleanChecks if this month-day is before the specified month-day.
booleanChecks if the specified field is supported.
booleanisValidYear(int year) Checks if the year is valid for this month-day.
now()Obtains the current month-day from the system clock in the default time-zone.
Obtains the current month-day from the specified clock.
Obtains the current month-day from the system clock in the specified time-zone.
of(int month, int dayOfMonth) Obtains an instance of
MonthDay.of(Month month, int dayOfMonth) Obtains an instance of
MonthDay.Obtains an instance of
MonthDayfrom a text string such as--12-03.Obtains an instance of
MonthDayfrom a text string using a specific formatter.<R> RQueries this month-day using the specified query.
Gets the range of valid values for the specified field.
toString()Outputs this month-day as a
String, such as--12-03.Returns a copy of this
MonthDaywith the month-of-year altered.withDayOfMonth(int dayOfMonth) Returns a copy of this
MonthDaywith the day-of-month altered.withMonth(int month) Returns a copy of this
MonthDaywith the month-of-year altered.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Method Details
-
now
-
now
-
now
-
of
-
of
-
from
-
parse
-
parse
-
isSupported
-
range
-
get
-
getLong
-
getMonthValue
-
getMonth
-
getDayOfMonth
-
isValidYear
-
withMonth
-
with
-
withDayOfMonth
-
query
-
adjustInto
-
format
-
atYear
-
compareTo
-
isAfter
-
isBefore
-
equals
-
hashCode
-
toString
-