Appendix - Date and Time Classes
The purpose of this appendix is to provide an easy way of determining whether a class supports a certain type of method. For example, suppose you want to know if the LocalDateTime class supports conversion to a LocalDate. A to type method may be available for this operation. By examining Table 9 - To Type Method we can see that it does, using the toLocalDate method.
These tables have been adapted from the Java 8 documentation.
-Of Type Methods
-The from Method
-The parse Method
-Get Type Methods
-Is Type Methods
-With Type Methods
-Plus Type Methods
-Minus Type Methods
-To Type Methods
-At Type Methods
Of Type Methods
The static of type methods returns an instance of the class they are executing against. The state of the object is based on the arguments of the method. The unit of measure used by the argument varies from nanoseconds to years. In addition, some methods use other classes and strings as arguments. Table 1 - Of Type Methods lists the classes that support of type methods.
Table 1 - Of Type Methods
Class Methods
Duration of(long amount, TemporalUnit unit)
ofDays(long days)
ofHours(long hours)
ofMillis(long millis)
ofMinutes(long minutes)
ofNanos(long nanos)
ofSeconds(long seconds)
ofSeconds(long seconds, long nanoAdjustment)
Instant ofEpochMilli(long epochMilli)
ofEpochSecond(long epochSecond)
ofEpochSecond(long epochSecond, long nanoAdjustment)
LocalDate of(int year, int month, int dayOfMonth)
of(int year, Month month, int dayOfMonth)
ofEpochDay(long epochDay)
ofYearDay(int year, int dayOfYear)
LocalDateTime
of(int year, int month, int dayOfMonth, int hour, int minute)
of(int year, int month, int dayOfMonth, int hour, int minute, int second)
of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond)
of(int year, Month month, int dayOfMonth, int hour, int minute)
of(int year, Month month, int dayOfMonth, int hour, int minute, int second)
of(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond)
of(LocalDate date, LocalTime time)
ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset)
ofInstant(Instant instant, ZoneId zone)
LocalTime of(int hour, int minute)
of(int hour, int minute, int second)
of(int hour, int minute, int second, int nanoOfSecond)
ofNanoOfDay(long nanoOfDay)
ofSecondOfDay(long secondOfDay)
MonthDay of(int month, int dayOfMonth)
of(Month month, int dayOfMonth)
OffsetDateTime of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset)
of(LocalDate date, LocalTime time, ZoneOffset offset)
of(LocalDateTime dateTime, ZoneOffset offset)
ofInstant(Instant instant, ZoneId zone)
OffsetTime of(LocalTime time, ZoneOffset offset)
ofInstant(Instant instant, ZoneId zone)
Period of(int years, int months, int days)
ofDays(int days)
ofMonths(int months)
ofWeeks(int weeks)
ofYears(int years)
Year of(int isoYear)
YearMonth
of(int year, int month)
of(int year, Month month)
ZonedDateTime of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneId zone)
of(LocalDate date, LocalTime time, ZoneId zone)
of(LocalDateTime localDateTime, ZoneId zone)
ofInstant(Instant instant, ZoneId zone)
ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)
ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferredOffset)
ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)
ZoneId of(String zoneId)
of(String zoneId, Map<String,String> aliasMap)
ofOffset(String prefix, ZoneOffset offset)
ZoneOffset of(String offsetId)
ofHours(int hours)
ofHoursMinutes(int hours, int minutes)
ofHoursMinutesSeconds(int hours, int minutes, int seconds)
ofTotalSeconds(int totalSeconds)
The from Method
The static from method is very consistent in its signature from class to class with the exception of the Duration class. The method returns an instance of the class it executes against. Each from method accepts a TemporalAccessor object as an argument with the exception of the Duration class which uses a TemporalAmount object. Table 2 lists the classes that support the from method.
Table 2 - From Methods
Class Method
Duration from(TemporalAmount amount)
Instant from(TemporalAccessor temporal)
LocalDate from(TemporalAccessor temporal)
LocalDateTime from(TemporalAccessor temporal)
LocalTime from(TemporalAccessor temporal)
MonthDay from(TemporalAccessor temporal)
OffsetDateTime from(TemporalAccessor temporal)
OffsetTime from(TemporalAccessor temporal)
Period from(TemporalAmount amount)
Year from(TemporalAccessor temporal)
YearMonth from(TemporalAccessor temporal)
ZonedDateTime from(TemporalAccessor temporal)
ZoneId from(TemporalAccessor temporal)
ZoneOffset from(TemporalAccessor temporal)
The parse Method
The static parse method is consistent between those classes that implement it. The method returns an instance of the class it executes against. The overloaded method uses either one or two arguments. The first argument is always a CharSequence. When the second argument is present, it is a DateTimeFormatter instance. Table 3 - Parse Methods lists the classes that support the parse method.
Class
Methods Supported
Duration
Instant
LocalDate
LocalDateTime
LocalTime
MonthDay
Period
parse(CharSequence text)
OffsetDateTime
OffsetDateTime
OffsetTime
OffsetTime
Year
Year
YearMonth
YearMonth
ZonedDateTime
ZonedDateTime
parse(CharSequence text)
parse(CharSequence text, DateTimeFormatter formatter)
Table 3 - Parse Methods
Class Methods Supported
Duration | Instant | LocalDate | LocalDateTime | LocalTime | MonthDay | Period parse(CharSequence text)
OffsetDateTime | OffsetTime | Year | YearMonth | ZonedDateTime parse(CharSequence text) | parse(CharSequence text, DateTimeFormatter formatter)
Get Type Methods
The get method returns information about an object. The information is usually of type integer but a class or enumeration may also be returned. The methods supported by a class depend on the needs of the class. Table 4 - Get Type Methods lists the classes that support get type methods.
Table 4 - Get Type Methods
Class Method
Clock ZoneId getZone()
Duration long get(TemporalUnit unit)
int getNano()
long getSeconds()
List<TemporalUnit> getUnits()
Instant int get(TemporalField field)
long getEpochSecond()
long getLong(TemporalField field)
int getNano()
LocalDate int get(TemporalField field)
IsoChronology getChronology()
int getDayOfMonth()
DayOfWeek getDayOfWeek()
int getDayOfYear()
Era getEra()
long getLong(TemporalField field)
Month getMonth()
int getMonthValue()
int getYear()
LocalDateTime int get(TemporalField field)
int getDayOfMonth()
DayOfWeek getDayOfWeek()
int getDayOfYear()
int getHour()
long getLong(TemporalField field)
int getMinute()
Month getMonth()
int getMonthValue()
int getNano()
int getSecond()
int getYear()
LocalTime int get(TemporalField field)
int getHour()
long getLong(TemporalField field)
int getMinute()
int getNano()
int getSecond()
MonthDay int get(TemporalField field)
int getDayOfMonth()
long getLong(TemporalField field)
Month getMonth()
int getMonthValue()
OffsetDateTime int get(TemporalField field)
int getDayOfMonth()
DayOfWeek getDayOfWeek()
int getDayOfYear()
int getHour()
long getLong(TemporalField field)
int getMinute()
Month getMonth()
int getMonthValue()
int getNano()
ZoneOffset getOffset()
int getSecond()
int getYear()
OffsetTime int get(TemporalField field)
int getHour()
long getLong(TemporalField field)
int getMinute()
int getNano()
ZoneOffset getOffset()
int getSecond()
Period long get(TemporalUnit unit)
IsoChronology getChronology()
int getDays()
int getMonths()
List<TemporalUnit> getUnits()
int getYears()
Year int get(TemporalField field)
long getLong(TemporalField field)
int getValue() Gets the year value.
YearMonth int get(TemporalField field)
long getLong(TemporalField field)
Month getMonth()
int getMonthValue()
int getYear()
ZonedDateTime int get(TemporalField field)
int getDayOfMonth()
DayOfWeek getDayOfWeek()
int getDayOfYear()
int getHour()
long getLong(TemporalField field)
int getMinute()
Month getMonth()
int getMonthValue()
int getNano()
ZoneOffset getOffset()
int getSecond()
int getYear()
ZoneId getZone()
ZoneId static Set<String> getAvailableZoneIds()
String getDisplayName(TextStyle style, Locale locale)
abstract String getId()
abstract ZoneRules getRules()
ZoneOffset int get(TemporalField field)
String getId()
Long getLong(TemporalField field)
ZoneRules getRules()
int getTotalSeconds()
Is Type Methods
The is type methods all return a boolean value. The actual method supported by a class is dependent on the requirements of the class. Table 5 - Is Type Methods lists the classes that support is type methods.
Table 5 - Is Type Methods
Class Methods
Duration boolean isNegative
boolean isZero()
Instant boolean isAfter(Instant otherInstant)
boolean isBefore(Instant otherInstant)
boolean isSupported(TemporalField field)
boolean isSupported(TemporalUnit unit)
LocalDate boolean isAfter(ChronoLocalDate other)
boolean isBefore(ChronoLocalDate other)
boolean isEqual(ChronoLocalDate other)
boolean isLeapYear()
boolean isSupported(TemporalField field)
boolean isSupported(TemporalUnit unit)
LocalDateTime boolean isAfter(ChronoLocalDateTime<?> other)
boolean isBefore(ChronoLocalDateTime<?> other)
boolean isEqual(ChronoLocalDateTime<?> other)
boolean isSupported(TemporalField field)
boolean isSupported(TemporalUnit unit)
LocalTime boolean isAfter(LocalTime other)
boolean isBefore(LocalTime other)
boolean isSupported(TemporalField field)
boolean isSupported(TemporalUnit unit)
MonthDay boolean isAfter(MonthDay other)
boolean isBefore(MonthDay other)
boolean isSupported(TemporalField field)
boolean isValidYear(int year)
OffsetDateTime boolean isAfter(OffsetDateTime other)
boolean isBefore(OffsetDateTime other)
boolean isEqual(OffsetDateTime other)
boolean isSupported(TemporalField field)
boolean isSupported(TemporalUnit unit)
OffsetTime boolean isAfter(OffsetTime other)
boolean isBefore(OffsetTime other)
boolean isEqual(OffsetTime other)
boolean isSupported(TemporalField field)
boolean isSupported(TemporalUnit unit)
Period boolean isNegative()
boolean isZero()
Year boolean isAfter(Year other)
boolean isBefore(Year other)
boolean isLeap()
static boolean isLeap(long year)
boolean isSupported(TemporalField field)
boolean isSupported(TemporalUnit unit)
boolean isValidMonthDay(MonthDay monthDay)
YearMonth boolean isAfter(YearMonth other)
boolean isBefore(YearMonth other)
boolean isLeapYear()
boolean isSupported(TemporalField field)
boolean isSupported(TemporalUnit unit)
boolean isValidDay(int dayOfMonth)
ZonedDateTime boolean isSupported(TemporalField field)
boolean isSupported(TemporalUnit unit)
ZoneOffset boolean isSupported(TemporalField field)
With Type Methods
These methods always return an instance of the class they execute against. The methods supported vary by class. In general, they return a modified version of the original class. Table 6 - With Type Methods lists the classes that support with type methods.
Table 6 - With Type Methods
Class Method
Clock Clock withZone(ZoneId zone)
Duration Duration withNanos(int nanoOfSecond)
Duration withSeconds(long seconds)
Instant Instant with(TemporalAdjuster adjuster)
Instant with(TemporalField field, long newValue)
LocalDate LocalDate with(TemporalAdjuster adjuster)
LocalDate with(TemporalField field, long newValue)
LocalDate withDayOfMonth(int dayOfMonth)
LocalDate withDayOfYear(int dayOfYear)
LocalDate withMonth(int month)
LocalDate withYear(int year)
LocalDateTime LocalDateTime with(TemporalAdjuster adjuster)
LocalDateTime with(TemporalField field, long newValue)
LocalDateTime withDayOfMonth(int dayOfMonth)
LocalDateTime withDayOfYear(int dayOfYear)
LocalDateTime withHour(int hour)
LocalDateTime withMinute(int minute)
LocalDateTime withMonth(int month)
LocalDateTime withNano(int nanoOfSecond)
LocalDateTime withSecond(int second)
LocalDateTime withYear(int year)
LocalTime LocalTime with(TemporalAdjuster adjuster)
LocalTime with(TemporalField field, long newValue)
LocalTime withHour(int hour)
LocalTime withMinute(int minute)
LocalTime withNano(int nanoOfSecond)
LocalTime withSecond(int second)
MonthDay MonthDay with(Month month)
MonthDay withDayOfMonth(int dayOfMonth)
MonthDay withMonth(int month)
OffsetDateTime LocalDateTime with(TemporalAdjuster adjuster)
LocalDateTime with(TemporalField field, long newValue)
LocalDateTime withDayOfMonth(int dayOfMonth)
LocalDateTime withDayOfYear(int dayOfYear)
LocalDateTime withHour(int hour)
LocalDateTime withMinute(int minute)
LocalDateTime withMonth(int month)
LocalDateTime withNano(int nanoOfSecond)
LocalDateTime withSecond(int second)
LocalDateTime withYear(int year)
OffsetTime OffsetTime with(TemporalAdjuster adjuster)
OffsetTime with(TemporalField field, long newValue)
OffsetTime withHour(int hour)
OffsetTime withMinute(int minute)
OffsetTime withNano(int nanoOfSecond)
OffsetTime withOffsetSameInstant(ZoneOffset offset)
OffsetTime withOffsetSameLocal(ZoneOffset offset)
OffsetTime withSecond(int second)
Period Period withDays(int days)
Period withMonths(int months)
Period withYears(int years)
Year Year with(TemporalAdjuster adjuster)
Year with(TemporalField field, long newValue)
YearMonth YearMonth with(TemporalAdjuster adjuster)
YearMonth with(TemporalField field, long newValue)
YearMonth withMonth(int month)
YearMonth withYear(int year)
ZonedDateTime ZonedDateTime with(TemporalAdjuster adjuster)
ZonedDateTime with(TemporalField field, long newValue)
ZonedDateTime withDayOfMonth(int dayOfMonth)
ZonedDateTime withDayOfYear(int dayOfYear)
ZonedDateTime withEarlierOffsetAtOverlap()
ZonedDateTime withFixedOffsetZone()
ZonedDateTime withHour(int hour)
ZonedDateTime withLaterOffsetAtOverlap()
ZonedDateTime withMinute(int minute)
ZonedDateTime withMonth(int month)
ZonedDateTime withNano(int nanoOfSecond)
ZonedDateTime withSecond(int second)
ZonedDateTime withYear(int year)
ZonedDateTime withZoneSameInstant(ZoneId zone)
ZonedDateTime withZoneSameLocal(ZoneId zone)
Plus Type Methods
These methods return a new object after adding a time unit to an existing object. The object returned is of the same type as the object the method was executed against. The methods supported depend on the class, but all classes support the following method:
plus(long amountToAdd, TemporalUnit unit)
Table 7 - Plus Type Methods lists the classes that support plus type methods.
Table 7 - Plus Type Methods
Class Methods
Duration Duration plus(long amountToAdd, TemporalUnit unit)
Duration plusDays(long daysToAdd)
Duration plusHours(long hoursToAdd)
Duration plusMillis(long millisToAdd)
Duration plusMinutes(long minutesToAdd)
Duration plusNanos(long nanosToAdd)
Duration plusSeconds(long secondsToAdd)
Instant Instant plus(long amountToAdd, TemporalUnit unit)
Instant plus(TemporalAmount amountToAdd)
Instant plusMillis(long millisToAdd)
Instant plusNanos(long nanosToAdd)
Instant plusSeconds(long secondsToAdd)
LocalDate LocalDate plus(long amountToAdd, TemporalUnit unit)
LocalDate plus(TemporalAmount amountToAdd)
LocalDate plusDays(long daysToAdd)
LocalDate plusMonths(long monthsToAdd)
LocalDate plusWeeks(long weeksToAdd)
LocalDate plusYears(long yearsToAdd)
LocalDateTime LocalDateTime plus(long amountToAdd, TemporalUnit unit)
LocalDateTime plus(TemporalAmount amountToAdd)
LocalDateTime plusDays(long days)
LocalDateTime plusHours(long hours)
LocalDateTime plusMinutes(long minutes)
LocalDateTime plusMonths(long months)
LocalDateTime plusNanos(long nanos)
LocalDateTime plusSeconds(long seconds)
LocalDateTime plusWeeks(long weeks)
LocalDateTime plusYears(long years)
LocalTime LocalTime plus(long amountToAdd, TemporalUnit unit)
LocalTime plus(TemporalAmount amountToAdd)
LocalTime plusHours(long hoursToAdd)
LocalTime plusMinutes(long minutesToAdd)
LocalTime plusNanos(long nanosToAdd)
LocalTime plusSeconds(long secondstoAdd)
OffsetDateTime OffsetDateTime plus(long amountToAdd, TemporalUnit unit)
OffsetDateTime plus(TemporalAmount amountToAdd)
OffsetDateTime plusDays(long days)
OffsetDateTime plusHours(long hours)
OffsetDateTime plusMinutes(long minutes)
OffsetDateTime plusMonths(long months)
OffsetDateTime plusNanos(long nanos)
OffsetDateTime plusSeconds(long seconds)
OffsetDateTime plusWeeks(long weeks)
OffsetDateTime plusYears(long years)
OffsetTime OffsetTime plus(long amountToAdd, TemporalUnit unit)
OffsetTime plus(TemporalAmount amountToAdd)
OffsetTime plusHours(long hours)
OffsetTime plusMinutes(long minutes)
OffsetTime plusNanos(long nanos)
OffsetTime plusSeconds(long seconds)
Period Period plus(TemporalAmount amountToAdd)
Period plusDays(long daysToAdd)
Period plusMonths(long monthsToAdd)
Period plusYears(long yearsToAdd)
Year Year plus(long amountToAdd, TemporalUnit unit)
Year plus(TemporalAmount amountToAdd)
Year plusYears(long yearsToAdd)
YearMonth YearMonth plus(long amountToAdd, TemporalUnit unit)
YearMonth plus(TemporalAmount amountToAdd)
YearMonth plusMonths(long monthsToAdd)
YearMonth plusYears(long yearsToAdd)
ZonedDateTime ZonedDateTime plus(long amountToAdd, TemporalUnit unit)
ZonedDateTime plus(TemporalAmount amountToAdd)
ZonedDateTime plusDays(long days)
ZonedDateTime plusHours(long hours)
ZonedDateTime plusMinutes(long minutes)
ZonedDateTime plusMonths(long months)
ZonedDateTime plusNanos(long nanos)
ZonedDateTime plusSeconds(long seconds)
ZonedDateTime plusWeeks(long weeks)
ZonedDateTime plusYears(long years)
Minus Type Methods
The minus type methods all return the same type of class that they execute against. The object returned is a new object that is based on the original object where a unit of time has been subtracted. The methods supported are dependent on the class. However, with the exception of the Duration class, they all support the following method:
minus(TemporalAmount amountToSubtract)
Table 8 - Minus Type Methods lists the classes that support minus type methods.
Table 8 - Minus Type Methods
Class Method
Duration minus(Duration duration)
minus(long amountToSubtract, TemporalUnit unit)
minusDays(long daysToSubtract)
minusHours(long hoursToSubtract)
minusMillis(long millisToSubtract)
minusMinutes(long minutesToSubtract)
minusNanos(long nanosToSubtract)
minusSeconds(long secondsToSubtract)
Instant minus(long amountToSubtract, TemporalUnit unit)
minus(TemporalAmount amountToSubtract)
minusMillis(long millisToSubtract)
minusNanos(long nanosToSubtract)
minusSeconds(long secondsToSubtract)
LocalDate minus(long amountToSubtract, TemporalUnit unit)
minus(TemporalAmount amountToSubtract)
minusDays(long daysToSubtract)
minusMonths(long monthsToSubtract)
minusWeeks(long weeksToSubtract)
minusYears(long yearsToSubtract)
LocalDateTime minus(long amountToSubtract, TemporalUnit unit)
minus(TemporalAmount amountToSubtract)
minusDays(long days)
minusHours(long hours)
minusMinutes(long minutes)
minusMonths(long months)
minusNanos(long nanos)
minusSeconds(long seconds)
minusWeeks(long weeks)
minusYears(long years)
LocalTime minus(long amountToSubtract, TemporalUnit unit)
minus(TemporalAmount amountToSubtract)
minusHours(long hoursToSubtract)
minusMinutes(long minutesToSubtract)
minusNanos(long nanosToSubtract)
minusSeconds(long secondsToSubtract)
OffsetDateTime minus(long amountToSubtract, TemporalUnit unit)
minus(TemporalAmount amountToSubtract)
minusDays(long days)
minusHours(long hours)
minusMinutes(long minutes)
minusMonths(long months)
minusNanos(long nanos)
minusSeconds(long seconds)
minusWeeks(long weeks)
minusYears(long years)
OffsetTime minus(long amountToSubtract, TemporalUnit unit)
minus(TemporalAmount amountToSubtract)
minusHours(long hours)
minusMinutes(long minutes)
minusNanos(long nanos)
minusSeconds(long seconds)
Period minus(TemporalAmount amountToSubtract)
minusDays(long daysToSubtract)
minusMonths(long monthsToSubtract)
minusYears(long yearsToSubtract)
Year minus(long amountToSubtract, TemporalUnit unit)
minus(TemporalAmount amountToSubtract)
minusYears(long yearsToSubtract)
YearMonth minus(long amountToSubtract, TemporalUnit unit)
minus(TemporalAmount amountToSubtract)
minusMonths(long monthsToSubtract)
minusYears(long yearsToSubtract)
ZonedDateTime minus(long amountToSubtract, TemporalUnit unit)
minus(TemporalAmount amountToSubtract)
minusDays(long days)
minusHours(long hours)
minusMinutes(long minutes)
minusMonths(long months)
minusNanos(long nanos)
minusSeconds(long seconds)
minusWeeks(long weeks)
minusYears(long years)
To Type Methods
These types of methods usually transform an object into a different type of data. Often it is an integer. It may also return a string or temporal object. They return different types depending on their purpose. Table 9 - To Type Methods lists the classes that support to type methods.
Table 9 - To Type Methods
Class Method
Duration long toDays()
long toHours()
long toMillis()
long toMinutes()
long toNanos()
String toString()
Instant long toEpochMilli()
String toString()
LocalDate long toEpochDay()
String toString()
LocalDateTime LocalDate toLocalDate()
LocalTime toLocalTime()
String toString()
LocalTime long toNanoOfDay()
int toSecondOfDay()
String toString()
MonthDay String toString()
OffsetDateTime long toEpochSecond()
Instant toInstant()
LocalDate toLocalDate()
LocalDateTime toLocalDateTime()
LocalTime toLocalTime()
OffsetTime toOffsetTime()
String toString()
ZonedDateTime toZonedDateTime()
OffsetTime LocalTime toLocalTime()
String toString()
Period String toString()
long toTotalMonths()
Year String toString()
YearMonth String toString()
ZonedDateTime LocalDate toLocalDate()
LocalDateTime toLocalDateTime()
LocalTime toLocalTime()
OffsetDateTime toOffsetDateTime()
String toString()
ZoneId String toString()
ZoneOffset String toString()
At Type Methods
The static at type methods return a new object based on a temporal unit such as time zone, local date, hours, or minutes. Table 10 - At Type Methods lists the classes that support of type methods.
Table 10 - At Type Methods
Class Method
Instant OffsetDateTime atOffset(ZoneOffset offset)
ZonedDateTime atZone(ZoneId zone)
LocalDate LocalDateTime atStartOfDay()
ZonedDateTime atStartOfDay(ZoneId zone)
LocalDateTime atTime(int hour, int minute)
LocalDateTime atTime(int hour, int minute, int second)
LocalDateTime atTime(int hour, int minute, int second, int nanoOfSecond)
LocalDateTime atTime(LocalTime time)
OffsetDateTime atTime(OffsetTime time)
LocalDateTime OffsetDateTime atOffset(ZoneOffset offset)
ZonedDateTime atZone(ZoneId zone)
LocalTime LocalDateTime atDate(LocalDate date)
OffsetTime atOffset(ZoneOffset offset)
MonthDay LocalDate atYear(int year)
OffsetDateTime ZonedDateTime atZoneSameInstant(ZoneId zone)
ZonedDateTime atZoneSimilarLocal(ZoneId zone)
OffsetTime OffsetDateTime atDate(LocalDate date)
Year LocalDate atDay(int dayOfYear)
YearMonth atMonth(int month)
YearMonth atMonth(Month month)
LocalDate atMonthDay(MonthDay monthDay)
YearMonth LocalDate atDay(int dayOfMonth)
LocalDate atEndOfMonth()
* * * * *