withCalendar method

LocalDate withCalendar(
  1. CalendarSystem calendar
)

Creates a new LocalDate representing the same physical date, but in a different calendar. The returned LocalDate is likely to have different field values to this one. For example, January 1st 1970 in the Gregorian calendar was December 19th 1969 in the Julian calendar.

  • calendar: The calendar system to convert this local date to.

Returns: The converted LocalDate

Implementation

LocalDate withCalendar(CalendarSystem calendar)
{
  Preconditions.checkNotNull(calendar, 'calendar');
  return LocalDate.fromEpochDay(epochDay, calendar);
}