MCPcopy
hub / github.com/brimdata/zui / add

Function add

apps/zui/src/js/models/time.ts:66–69  ·  view source on GitHub ↗
(amount: number, unit: TimeUnit)

Source from the content-addressed store, hash-verified

64 },
65
66 add(amount: number, unit: TimeUnit) {
67 const ts = dateToTs(moment(this.toDate()).add(amount, unit).toDate())
68 return time(ts)
69 },
70
71 subtract(amount: number, unit: TimeUnit) {
72 const ts = dateToTs(moment(this.toDate()).subtract(amount, unit).toDate())

Callers

nothing calls this directly

Calls 4

dateToTsFunction · 0.85
timeFunction · 0.85
toDateMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected