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

Method _buildValue

packages/main/src/DateRangePicker.ts:618–632  ·  view source on GitHub ↗

* Builds a string value out of two UTC timestamps - this method is the counterpart to _extractFirstTimestamp/_extractLastTimestamp * @private

(firstDateTimestamp: number | undefined, lastDateTimestamp: number | undefined)

Source from the content-addressed store, hash-verified

616 * @private
617 */
618 _buildValue(firstDateTimestamp: number | undefined, lastDateTimestamp: number | undefined): string {
619 this._prevDelimiter = this._effectiveDelimiter;
620 if (firstDateTimestamp) {
621 const firstDateString = this._getValueStringFromTimestamp(firstDateTimestamp * 1000);
622
623 if (!lastDateTimestamp) {
624 return firstDateString;
625 }
626
627 const lastDateString = this._getValueStringFromTimestamp(lastDateTimestamp * 1000);
628 return `${firstDateString} ${this._effectiveDelimiter} ${lastDateString}`;
629 }
630
631 return "";
632 }
633
634 /**
635 * Builds a string value out of two UTC timestamps - this method is the counterpart to _extractFirstTimestamp/_extractLastTimestamp

Callers 4

_submitClickMethod · 0.95
normalizeValueMethod · 0.95
onSelectedDatesChangeMethod · 0.95
_modifyDateValueMethod · 0.95

Calls 1

Tested by

no test coverage detected