MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / termToHours

Function termToHours

internal/estimate/estimator.go:117–126  ·  view source on GitHub ↗

termToHours converts a term string to the number of hours in that term. Returns 0 for unknown terms.

(term string)

Source from the content-addressed store, hash-verified

115// termToHours converts a term string to the number of hours in that term.
116// Returns 0 for unknown terms.
117func termToHours(term string) int64 {
118 switch strings.TrimSpace(strings.ToLower(term)) {
119 case "1yr", "1y":
120 return 8760
121 case "3yr", "3y":
122 return 26280
123 default:
124 return 0
125 }
126}
127
128// amortizedHourlyRate returns the effective hourly rate for a PriceEntry,
129// spreading any upfront fee evenly over the term hours.

Callers 1

amortizedHourlyRateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected