MCPcopy Create free account
hub / github.com/UI5/webcomponents / _modifyTimestampBy

Method _modifyTimestampBy

packages/main/src/DayPicker.ts:796–803  ·  view source on GitHub ↗

* Modifies the timestamp by a certain amount of days/months/years. * @param amount * @param unit * @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April) * @private

(amount: number, unit: string, preserveDate?: boolean)

Source from the content-addressed store, hash-verified

794 * @private
795 */
796 _modifyTimestampBy(amount: number, unit: string, preserveDate?: boolean) {
797 // Modify the current timestamp
798 this._safelyModifyTimestampBy(amount, unit, preserveDate);
799 this._updateSecondTimestamp();
800
801 // Notify the calendar to update its timestamp
802 this.fireDecoratorEvent("navigate", { timestamp: this.timestamp! });
803 }
804
805 /**
806 * Sets the timestamp to an absolute value.

Callers 3

_onkeydownMethod · 0.95
_showPreviousPageMethod · 0.95
_showNextPageMethod · 0.95

Calls 2

Tested by

no test coverage detected