Example
CEL
gluon.days(duration("48h"))
This returns 2. gluon.days(duration("36h")) returns 1.
Types
The type checker knows it as gluon.days(duration) -> int. Call it in any GOL field that takes CEL: a Function, a derived property, a constraint or a policy condition.
Limits
It divides the seconds by 86,400 and rounds down. A negative part day therefore moves away from zero: gluon.days(duration("-1h")) is -1.
Guard optional inputs with has(). In a policy, an evaluation error denies. An expression that does not parse, runs past 2,000 characters or nests too deeply is GLN-E201, and one whose result has the wrong type is GLN-E202.
See Function, Test and the language guide.
