MCPcopy Create free account
hub / github.com/dailydotdev/apps / formatReadTime

Function formatReadTime

packages/shared/src/components/utilities/common.tsx:212–218  ·  view source on GitHub ↗
(minutes: number)

Source from the content-addressed store, hash-verified

210}
211
212export const formatReadTime = (minutes: number): string => {
213 const hours = Math.floor(minutes / 60);
214 const remainingMinutes = minutes % 60;
215 return hours > 0
216 ? `${hours.toString()}h ${remainingMinutes.toString()}m`
217 : `${remainingMinutes.toString()}m`;
218};
219
220export const lazyCommentThreshold = 5;
221

Callers 3

common.spec.tsxFile · 0.90
PostMetadataFunction · 0.90
PostReadTimeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected