MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / toString

Function toString

packages/core/ui/time-picker/time-picker-common.ts:75–81  ·  view source on GitHub ↗
(value: number | Date)

Source from the content-addressed store, hash-verified

73}
74
75function toString(value: number | Date): string {
76 if (value instanceof Date) {
77 return value + '';
78 }
79
80 return value < 10 ? `0${value}` : `${value}`;
81}
82
83function getMinMaxTimeErrorMessage(picker: TimePickerDefinition): string {
84 return `Min time: (${toString(picker.minHour)}:${toString(picker.minMinute)}), max time: (${toString(picker.maxHour)}:${toString(picker.maxMinute)})`;

Callers 2

getErrorMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected