MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / addTimePadding

Function addTimePadding

core/src/components/datetime/utils/format.ts:90–97  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

88 * that it is always 2 digits.
89 */
90export const addTimePadding = (value: number): string => {
91 const valueToString = value.toString();
92 if (valueToString.length > 1) {
93 return valueToString;
94 }
95
96 return `0${valueToString}`;
97};
98
99/**
100 * Formats 24 hour times so that

Callers 3

getTimeColumnsDataFunction · 0.90
format.spec.tsFile · 0.90
getFormattedHourFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected