MCPcopy Index your code
hub / github.com/MALSync/MALSync / getRelativeNowFriendlyText

Method getRelativeNowFriendlyText

src/utils/IntlWrapper.ts:271–276  ·  view source on GitHub ↗
(style: DurationStyle = 'Duration', options?: DurationFormatOptions)

Source from the content-addressed store, hash-verified

269 }
270
271 getRelativeNowFriendlyText(style: DurationStyle = 'Duration', options?: DurationFormatOptions) {
272 if (!this.isValidDate()) return '';
273 if (this.isNow()) return api.storage.lang('bookmarksItem_now');
274 const timeString = this.getRelativeNowText(style, options);
275 return this.isFuture() ? timeString : api.storage.lang('bookmarksItem_ago', [timeString]);
276 }
277}
278
279// Utility for exporting

Callers 3

getPredictionMethod · 0.80
getLastMethod · 0.80

Calls 5

isValidDateMethod · 0.95
isNowMethod · 0.95
getRelativeNowTextMethod · 0.95
isFutureMethod · 0.95
langMethod · 0.80

Tested by

no test coverage detected