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

Method getValueFromDisplayValue

packages/main/src/TimePicker.ts:899–905  ·  view source on GitHub ↗

* Converts a value from displayFormat to valueFormat * @param value Value in displayFormat * @returns Value in valueFormat * @private

(value: string)

Source from the content-addressed store, hash-verified

897 * @private
898 */
899 getValueFromDisplayValue(value: string): string {
900 if (!this.getDisplayFormat().parse(value, true)) {
901 return value;
902 }
903
904 return this.getValueFormat().format(this.getDisplayFormat().parse(value, true), true);
905 }
906
907 /**
908 * Converts a value from valueFormat to displayFormat

Callers

nothing calls this directly

Calls 4

getDisplayFormatMethod · 0.95
getValueFormatMethod · 0.95
parseMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected