add method
Adds the specified period to this date. Fluent alternative to operator+()
.
period
: The period to add. Must not contain any (non-zero) time units.
Returns: The sum of this date and the given period
Implementation
LocalDate add(Period period) {
Preconditions.checkNotNull(period, 'period');
Preconditions.checkArgument(!period.hasTimeComponent, 'period', "Cannot add a period with a time component to a date");
return IPeriod.addDateTo(period, this, 1);
}