class

Krikri::JinjaDateTime::TimeDelta

Inherits KrikriJinja::HostObject < Reference < Object

A duration in microseconds, normalized like CPython's timedelta: days carries the sign, seconds and microseconds never do.

Constructors

new(micros : Int64)
Source

Instance methods

binary_op(op : String, other : AnyValue, reflected : Bool) : AnyValue | Nil

A binary arithmetic operator with other. reflected is true when this object is the right-hand operand (Python's radd and friends). Nil means unsupported for that operand.

Source
compare(other : AnyValue) : Int32 | Nil

Ordering against other (-1, 0, 1), or nil when incomparable.

Source
days
Source
get_attr(name : String) : AnyValue | Nil

Attribute or method lookup (value.days, value.strftime(...)); nil when the object has no such attribute.

Source
micros
Source
microseconds
Source
repr

Python's repr(), used inside list/dict output. Defaults to str().

Source
seconds
Source
to_json_any

ansible-core refuses to store a timedelta as a variable value.

Source
to_s(io : IO) : Nil

Python's str(): what {{ value }} renders.

Source
truthy?
Source