MCPcopy Create free account
hub / github.com/github/relative-time-element / negateDuration

Function negateDuration

src/relative-time-element.ts:58–69  ·  view source on GitHub ↗
(duration: Duration)

Source from the content-addressed store, hash-verified

56}
57
58function negateDuration(duration: Duration): Duration {
59 return new Duration(
60 -duration.years,
61 -duration.months,
62 -duration.weeks,
63 -duration.days,
64 -duration.hours,
65 -duration.minutes,
66 -duration.seconds,
67 -duration.milliseconds,
68 )
69}
70
71function getExplicitThreshold(el: RelativeTimeElement): string | null {
72 const threshold = el.getAttribute('threshold')

Callers 1

getUnitFactorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…