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

Method setRelativeTime

src/utils/IntlWrapper.ts:88–96  ·  view source on GitHub ↗
(
    relativeTime: number,
    convertFrom: keyof typeof dateUnitToMs,
    style: DurationStyle = 'Duration',
  )

Source from the content-addressed store, hash-verified

86
87 // For 9000 (seconds)
88 setRelativeTime(
89 relativeTime: number,
90 convertFrom: keyof typeof dateUnitToMs,
91 style: DurationStyle = 'Duration',
92 ) {
93 const ms = relativeTime * dateUnitToMs[convertFrom];
94 this.duration = this.process(ms, style);
95 return this;
96 }
97
98 // For 1733320467580 (timestamp)
99 setTimestamp(

Callers 8

setDurationFormattedMethod · 0.95
setTimestampMethod · 0.95
infoMethod · 0.80
infoMethod · 0.80
infoMethod · 0.80
infoMethod · 0.80
infoMethod · 0.80

Calls 1

processMethod · 0.95

Tested by

no test coverage detected