def DateTime.rfc3339

bend-kit-time@0.3.0.0 · time.bend:342

import bend-kit-time@0.3.0.0/time.bend as Time
import Base

342def DateTime.rfc3339(t: DateTime) -> String:
343  match t:
344    case DateTime{Date{y, mo, d}, h, mi, s, n}:
345      String.concat([pad(y, 4n), "-", pad(mo, 2n), "-", pad(d, 2n), "T", pad(h, 2n), ":",
346        pad(mi, 2n), ":", pad(s, 2n), frac(n), "Z"])

Uses (7)

Used by (1)