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

Method getPredictionText

src/utils/progress.ts:54–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 }
53
54 getPredictionText() {
55 const timestamp = Number(this.getPredictionTimestamp());
56 if (Number.isNaN(timestamp)) return '';
57 const dt = new IntlDateTime(Number(timestamp));
58 const time = dt.getRelativeNowText('Progress', { style: 'long' });
59 if (!dt.isValidDate()) return '';
60 if (dt.isNow()) return api.storage.lang('bookmarksItem_now');
61 return api.storage.lang(`prediction_Episode_${this.type}`, [time]);
62 }
63
64 getLastTimestamp() {
65 if (!this.getProgressLastTimestamp()) return NaN;

Callers 1

getAutoTextMethod · 0.95

Calls 5

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

Tested by

no test coverage detected