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

Method _safelySetTimestamp

packages/main/src/CalendarPart.ts:70–82  ·  view source on GitHub ↗

* Change a timestamp and enforce limits * @param timestamp * @protected

(timestamp: number)

Source from the content-addressed store, hash-verified

68 * @protected
69 */
70 _safelySetTimestamp(timestamp: number) {
71 const min = this._minDate.valueOf() / 1000;
72 const max = this._maxDate.valueOf() / 1000;
73
74 if (timestamp < min) {
75 timestamp = min;
76 }
77 if (timestamp > max) {
78 timestamp = max;
79 }
80
81 this.timestamp = timestamp;
82 }
83
84 /**
85 * Modify a timestamp by a certain amount of days/months/years and enforce limits

Callers 10

_selectDateMethod · 0.80
_onmousedownMethod · 0.80
_setTimestampMethod · 0.80
_setTimestampMethod · 0.80
_selectMonthMethod · 0.80
_setTimestampMethod · 0.80
_selectYearRangeMethod · 0.80
_setTimestampMethod · 0.80
_selectYearMethod · 0.80

Calls 1

valueOfMethod · 0.80

Tested by

no test coverage detected