lang/Day.js
/**
		 * Calculates a new {@link Day} in the future (or past). If the new date is at the end of
		 * the month and the new month has fewer days than the current month, days will be subtracted
		 * as necessary (e.g. adding one year to February 29 will return February 28).
		 *
		 * @public
		 * @param {Number} years - The number of years to add (negative numbers can be used for subtraction).
		 * @param {Boolean=} inverse - If true, the sign of the "days" value will be flipped.
		 * @returns {Day}
		 */
Calculates a new  Day in the future (or past). If the new date is at the end of
the month and the new month has fewer days than the current month, days will be subtracted
as necessary .

@public
@param {Number} years - The number of years to add (negative numbers can be used for subtraction).
@param {Boolean=} inverse - If true, the sign of the "days" value will be flipped.
@returns {Day}
Calculates a new Day in the future ( or past ) . If the new date is at the end of the month and the new month has fewer days than the current month days will be subtracted as necessary . @public @param { Number } years - The number of years to add ( negative numbers can be used for subtraction ) . @param { Boolean = } inverse - If true the sign of the " days " value will be flipped . @returns { Day }
addYears(years, inverse) {
			assert.argumentIsRequired(years, 'years', Number);
			assert.argumentIsOptional(inverse, inverse, Boolean);
			assert.argumentIsValid(years, 'years', is.large, 'is an integer');
			let yearsToShift;
			if (is.boolean(inverse) && inverse) {
				yearsToShift = years * -1;
			} else {
				yearsToShift = years;
			}
			let shiftedYear = this.year + yearsToShift;
			let shiftedMonth = this.month;
			let shiftedDay = this.day;
			while (!Day.validate(shiftedYear, shiftedMonth, shiftedDay)) {
				shiftedDay = shiftedDay - 1;
			}
			return new Day(shiftedYear, shiftedMonth, shiftedDay);
		}
addYears ( years , inverse ) { assert . argumentIsRequired ( years , 'years' , Number ) ; assert . argumentIsOptional ( inverse , inverse , Boolean ) ; assert . argumentIsValid ( years , 'years' , is . large , 'is an integer' ) ; let yearsToShift ; if ( is . boolean ( inverse ) && inverse ) { yearsToShift = years * - 1 ; } else { yearsToShift = years ; } let shiftedYear = this . year + yearsToShift ; let shiftedMonth = this . month ; let shiftedDay = this . day ; while ( ! Day . validate ( shiftedYear , shiftedMonth , shiftedDay ) ) { shiftedDay = shiftedDay - 1 ; } return new Day ( shiftedYear , shiftedMonth , shiftedDay ) ; }
Calculates a new {@link Day} in the future (or past).
Calculates a new { @link Day } in the future ( or past ) .