MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / GetEffectiveDate

Method GetEffectiveDate

model/transaction.go:130–135  ·  view source on GitHub ↗

GetEffectiveDate returns the transaction's effective date, falling back to CreatedAt if not explicitly set.

()

Source from the content-addressed store, hash-verified

128
129// GetEffectiveDate returns the transaction's effective date, falling back to CreatedAt if not explicitly set.
130func (t *Transaction) GetEffectiveDate() time.Time {
131 if t.EffectiveDate != nil {
132 return *t.EffectiveDate
133 }
134 return t.CreatedAt // Fall back to CreatedAt for old records
135}
136
137// isLeftDistribution checks if a distribution is a "left" type
138func (d *Distribution) isLeftDistribution() bool {

Callers 1

TestGetEffectiveDateFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestGetEffectiveDateFunction · 0.64