MCPcopy
hub / github.com/pocketbase/pocketbase / AddDate

Method AddDate

tools/types/datetime.go:55–58  ·  view source on GitHub ↗

AddDate returns a new DateTime based on the current one + duration. It follows the same rules as [time.AddDate].

(years, months, days int)

Source from the content-addressed store, hash-verified

53//
54// It follows the same rules as [time.AddDate].
55func (d DateTime) AddDate(years, months, days int) DateTime {
56 d.t = d.t.AddDate(years, months, days)
57 return d
58}
59
60// After reports whether the current DateTime instance is after u.
61func (d DateTime) After(u DateTime) bool {

Callers 5

TestDateTimeAddDateFunction · 0.80
initLoggerMethod · 0.80
TestRecordAuthWithOTPFunction · 0.80
TestRecordRequestOTPFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestDateTimeAddDateFunction · 0.64
TestRecordAuthWithOTPFunction · 0.64
TestRecordRequestOTPFunction · 0.64