Time.DateTime.floor: def of bend-kit-time@0.3.0.0 Import: import bend-kit-time@0.3.0.0/time.bend as Time Lines 287-293 of bend-kit-time@0.3.0.0/time.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-time@0.3.0.0/time.bend&start_line=287&end_line=293 import Base import bend-kit-int@0.2.0.0/int.bend as Int # r is secs % 86400, which has the sign of secs. def DateTime.floor(neg: Bool, q: Int.I64, r: Int.I64, n: U32) -> Maybe<&2, DateTime>: match neg: case True{}: DateTime.at(Date.of_days(Int.I64.sub(q, i64(1))), (Int.I64.to_u32(r) + 86400 : U32), n) case False{}: DateTime.at(Date.of_days(q), Int.I64.to_u32(r), n) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64 https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64.sub https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64.to_u32 https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=Date.of_days https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=DateTime https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=DateTime.at https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=i64