def DateTime.to_instant

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

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

273# The instant of a UTC date and time. It does not check t; see DateTime.valid.
274def DateTime.to_instant(t: DateTime) -> Instant:
275  match t:
276    case DateTime{d, h, mi, s, n}:
277      Instant{Int.I64.add(Int.I64.mul(Date.to_days(d), i64(86400)),
278        i64((h * 3600 + mi * 60 + s : U32))), n}

Uses (9)

Used by (1)