class

Krikri::JinjaDateTime::DateTime

Inherits KrikriJinja::HostObject < Reference < Object

A naive datetime: wall-clock fields with no zone, held as a UTC Time.

Constructors

new(time : Time)
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
get_attr(name : String) : AnyValue | Nil

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

Source
isoformat
Source
microsecond
Source
repr

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

Source
time
Source
to_json_any

How the value crosses into JSON (tojson, host conversions).

Source
to_s(io : IO) : Nil

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

Source