Time.tzif.block: def of bend-kit-time@0.3.0.0 Import: import bend-kit-time@0.3.0.0/time.bend as Time Lines 683-694 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=683&end_line=694 import Base # h starts at a header; its data block follows it. Version 2+ blocks have 8-byte times and a footer. def tzif.block(+t8: Bool, +h: String) -> Maybe<&2, Zone>: +d = String.drop(h, 44n) +tc = tzif.count(h, 3n) +ty = tzif.count(h, 4n) +at = (tc * tzif.size(t8) + tc : Nat) +foot = String.drop(d, tzif.bsize(t8, h)) tzif.if(Bool.and(String.starts_with(h, "TZif"), Bool.and(Nat.is_gt(ty, 0n), Nat.is_le((44n + tzif.bsize(t8, h) : Nat), String.length(h)))), Zone{tzif.trans(tc, t8, d, String.drop(d, (tc * tzif.size(t8) : Nat))), tzif.types(ty, String.drop(d, at), String.take(String.drop(d, (at + ty * 6n : Nat)), tzif.count(h, 5n))), Bool.pick(String, t8, name(String.split(foot, '\n'), 1), "")}) Uses (24): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_gt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.split https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.starts_with https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.take https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=Zone https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=name https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=tzif.bsize https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=tzif.count https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=tzif.if https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=tzif.size https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=tzif.trans https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=tzif.types