()
| 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; |
no test coverage detected