[{"data":1,"prerenderedAt":414},["ShallowReactive",2],{"navigation_docs":3,"-api-zocam-span-arc":101,"-api-zocam-span-arc-surround":411},[4,23,66],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":22},"Guide","i-lucide-book-open","\u002Fguide","1.guide",[10,14,18],{"title":11,"path":12,"stem":13},"Introduction","\u002Fguide\u002Fintroduction","1.guide\u002F1.introduction",{"title":15,"path":16,"stem":17},"Getting started","\u002Fguide\u002Fgetting-started","1.guide\u002F2.getting-started",{"title":19,"path":20,"stem":21},"Pieces and sets","\u002Fguide\u002Fpieces-and-sets","1.guide\u002F3.pieces-and-sets",false,{"title":24,"icon":25,"path":26,"stem":27,"children":28},"Design (ADRs)","i-lucide-drafting-compass","\u002Fdesign","2.design",[29,32],{"title":30,"path":26,"stem":31},"Design decisions (ADRs)","2.design\u002Findex",{"title":33,"icon":34,"path":35,"stem":36,"children":37,"page":22},"Decision records","i-lucide-scroll-text","\u002Fdesign\u002Fadrs","2.design\u002Fadrs",[38,42,46,50,54,58,62],{"title":39,"path":40,"stem":41},"ADR-001: The refinement-chain model for calendar points","\u002Fdesign\u002Fadrs\u002F001-refinement-chain","2.design\u002Fadrs\u002F001-refinement-chain",{"title":43,"path":44,"stem":45},"ADR-002: Sets first — the Span algebra","\u002Fdesign\u002Fadrs\u002F002-set-primary-spans","2.design\u002Fadrs\u002F002-set-primary-spans",{"title":47,"path":48,"stem":49},"ADR-003: Overflow policy — clamp by default, skip on request","\u002Fdesign\u002Fadrs\u002F003-overflow-policy","2.design\u002Fadrs\u002F003-overflow-policy",{"title":51,"path":52,"stem":53},"ADR-004: Fortnights as every-k scopes","\u002Fdesign\u002Fadrs\u002F004-fortnight-scopes","2.design\u002Fadrs\u002F004-fortnight-scopes",{"title":55,"path":56,"stem":57},"ADR-005: One denotation function, and what DST does to it","\u002Fdesign\u002Fadrs\u002F005-shared-denotation","2.design\u002Fadrs\u002F005-shared-denotation",{"title":59,"path":60,"stem":61},"ADR-006: Zocam is a standalone, released library","\u002Fdesign\u002Fadrs\u002F006-standalone-library","2.design\u002Fadrs\u002F006-standalone-library",{"title":63,"path":64,"stem":65},"ADR-007: A set is one value — struct answers, enumerable shapes","\u002Fdesign\u002Fadrs\u002F007-one-value-sets","2.design\u002Fadrs\u002F007-one-value-sets",{"title":67,"path":68,"stem":69,"children":70,"icon":100},"API Reference","\u002Fapi","3.api\u002Findex",[71,72,76,80,84,88,92,96],{"title":67,"path":68,"stem":69},{"title":73,"path":74,"stem":75},"Zocam","\u002Fapi\u002Fzocam","3.api\u002Fzocam",{"title":77,"path":78,"stem":79},"Zocam.Intervals","\u002Fapi\u002Fzocam-intervals","3.api\u002Fzocam-intervals",{"title":81,"path":82,"stem":83},"Zocam.ISO","\u002Fapi\u002Fzocam-iso","3.api\u002Fzocam-iso",{"title":85,"path":86,"stem":87},"Zocam.Point","\u002Fapi\u002Fzocam-point","3.api\u002Fzocam-point",{"title":89,"path":90,"stem":91},"Zocam.Point.ComposeError","\u002Fapi\u002Fzocam-point-composeerror","3.api\u002Fzocam-point-composeerror",{"title":93,"path":94,"stem":95},"Zocam.Span","\u002Fapi\u002Fzocam-span","3.api\u002Fzocam-span",{"title":97,"path":98,"stem":99},"Zocam.Span.Arc","\u002Fapi\u002Fzocam-span-arc","3.api\u002Fzocam-span-arc","i-lucide-braces",{"id":102,"title":97,"body":103,"description":404,"extension":405,"links":406,"meta":407,"navigation":408,"path":98,"seo":409,"stem":99,"__hash__":410},"docs\u002F3.api\u002Fzocam-span-arc.md",{"type":104,"value":105,"toc":398},"minimark",[106,129,138,141,148,159,173,196,201,234,241,251,258,264,267,273,284,290,299,305,315,319,325,381,384,394],[107,108,109,115,116,120,121,128],"p",{},[110,111,114],"span",{"className":112},[113],"ai-slop","AI SLOP"," An AI agent wrote the docstrings; ",[117,118,119],"code",{},"mix docs"," generated this page. ",[122,123,127],"a",{"href":124,"rel":125},"https:\u002F\u002Fgithub.com\u002Fyuri4n",[126],"nofollow","yuri4n",", a senior engineer, gave the direction and did the review. The review is human, thus errors can stay.",[107,130,131],{},[122,132,137],{"href":133,"rel":134,"className":135},"https:\u002F\u002Fgithub.com\u002Fyuri4n\u002Fzocam\u002Fblob\u002Fmain\u002Flib\u002Fzocam\u002Fspan.ex#L171",[126],[136],"source-link","Source on GitHub ↗",[107,139,140],{},"A directed span between two bounds of the same form, with\nper-side closings, a step, and an overflow policy.",[107,142,143,144,147],{},"An arc always lives inside an ",[117,145,146],{},"{:arcs, scope, grain, arcs}"," node.\nThe node owns the scope and the grain — the arc holds only the\nbounds, so the two can never disagree. The smart constructors\nguarantee that every arc's chains match its node.",[107,149,150,151,154,155,158],{},"On a bare coarse unit the closing covers the whole unit:\n",[117,152,153],{},"until: february, right: :open"," excludes all of February;\n",[117,156,157],{},"right: :closed"," includes all of it.",[107,160,161,164,165,168,169,172],{},[117,162,163],{},"step: nil"," means \"no sampling\": the arc covers the whole block\nbetween its bounds. A ",[117,166,167],{},"{1, grain}"," step is the same set, so the\nconstructors normalize it to ",[117,170,171],{},"nil"," — one canonical spelling for\none meaning. The overflow policy comes from the bound points and\nacts where a day number lands in a short month.",[107,174,175,176,179,180,184,185,188,189,192,193,195],{},"An arc is not a ",[117,177,178],{},"t:Zocam.Intervals.interval\u002F0",". The arc is\nsymbolic and ",[181,182,183],"em",{},"repeats"," — \"Fri..Mon\" happens once in every week.\nThe interval is concrete and happens ",[181,186,187],{},"once",". ",[117,190,191],{},"Zocam.Span.ground\u002F3","\nturns each instance of an arc into 0, 1, or 2 concrete intervals\n(a DST gap, a normal day, a DST fold). See \"The four names\" in\nthe ",[117,194,73],{}," moduledoc for the full map.",[197,198,200],"h2",{"id":199},"enumerate-an-arc","Enumerate an arc",[107,202,203,204,207,208,211,212,215,216,215,219,222,223,226,227,230,231,233],{},"One instance of an arc is a row of grain cells, and ",[117,205,206],{},"Enum"," walks\nthat row: the struct implements ",[117,209,210],{},"Enumerable"," and yields the\nsymbolic cells of ONE instance, in walking order. Each cell comes\nout as the simplest honest value — the bare cell value when the\nbounds are single-segment chains (",[117,213,214],{},":friday",", ",[117,217,218],{},":november",[117,220,221],{},"15",",\n",[117,224,225],{},"~T[09:15:00]","), and a chain in which only the grain cell varies\nwhen the bounds carry a prefix (",[117,228,229],{},"[month: :may, day: 11]","). The\nwalk reuses ",[117,232,191],{},"'s reading of \"cell\": the same\nwrap rule, the same whole-unit closings, the same step sampling.",[107,235,236,237,240],{},"The common call — the four weekday cells of \"Friday through\nMonday\" (the smart constructors hand the arc back inside an\n",[117,238,239],{},"{:arcs, ...}"," node, so match it out first):",[242,243,248],"pre",{"className":244,"code":246,"language":247},[245],"language-text","iex> {:arcs, _, _, [weekend]} =\n...>   Zocam.Span.arc!(\n...>     from: Zocam.Point.weekday(:friday),\n...>     until: Zocam.Point.weekday(:monday)\n...>   )\niex> Enum.to_list(weekend)\n[:friday, :saturday, :sunday, :monday]\n","text",[117,249,246],{"__ignoreMap":250},"",[107,252,253,254,257],{},"Closings are honored: an ",[117,255,256],{},":open"," side drops that bound's whole\ncell, exactly as it does under grounding:",[242,259,262],{"className":260,"code":261,"language":247},[245],"iex> {:arcs, _, _, [stay]} =\n...>   Zocam.Span.arc!(\n...>     from: Zocam.Point.weekday(:friday),\n...>     until: Zocam.Point.weekday(:monday),\n...>     right: :open\n...>   )\niex> Enum.to_list(stay)\n[:friday, :saturday, :sunday]\n",[117,263,261],{"__ignoreMap":250},[107,265,266],{},"The edge: a wrapping arc walks through the cycle seam, inside\none instance — November through February is four month cells:",[242,268,271],{"className":269,"code":270,"language":247},[245],"iex> {:arcs, _, _, [winter]} =\n...>   Zocam.Span.arc!(\n...>     from: Zocam.Point.month(:november),\n...>     until: Zocam.Point.month(:february)\n...>   )\niex> Enum.to_list(winter)\n[:november, :december, :january, :february]\n",[117,272,270],{"__ignoreMap":250},[107,274,275,276,279,280,283],{},"The integrated use: a step whose unit is the grain samples every\nn-th cell, so a stepped ",[117,277,278],{},":time"," arc yields its sampled ",[117,281,282],{},"Time","\nvalues:",[242,285,288],{"className":286,"code":287,"language":247},[245],"iex> {:arcs, _, _, [morning]} =\n...>   Zocam.Span.arc!(\n...>     from: Zocam.Point.time(~T[09:00:00]),\n...>     until: Zocam.Point.time(~T[12:00:00]),\n...>     step: {15, :minute}\n...>   )\niex> Enum.count(morning)\n12\niex> Enum.take(morning, 3)\n[~T[09:00:00], ~T[09:15:00], ~T[09:30:00]]\n",[117,289,287],{"__ignoreMap":250},[107,291,292,293,295,296,298],{},"The pitfall: an UNstepped ",[117,294,278],{}," arc is continuous — between\nany two instants sit infinitely many more — so it has no cells\nto walk, and ",[117,297,206],{}," on it raises with the two ways out:",[242,300,303],{"className":301,"code":302,"language":247},[245],"iex> {:arcs, _, _, [window]} =\n...>   Zocam.Span.arc!(\n...>     from: Zocam.Point.time(~T[09:00:00]),\n...>     until: Zocam.Point.time(~T[12:00:00])\n...>   )\niex> Enum.to_list(window)\n** (ArgumentError) a :time-grain arc without a step is continuous, so it has no cells to enumerate. Two ways out: give the arc a step (for example step: {15, :minute}), or ground the span with Zocam.Span.ground\u002F3 and walk the concrete intervals.\n",[117,304,302],{"__ignoreMap":250},[107,306,307,308,311,312,314],{},"The same honesty applies to every arc whose one-instance cell\nrow is not fixed: a step whose unit is not the grain (\"the 31st,\nmonthly\" samples across real months), an ordinal or negative\nbound (each month elects its own \"last Saturday\"), bounds that\ndiffer above the grain cell, and a wrap in a cycle without a\nfixed length (a month has 28 to 31 days). Each raises an\n",[117,309,310],{},"ArgumentError"," that points to ",[117,313,191],{}," — the\ninterpreter that walks the real calendar.",[197,316,318],{"id":317},"types","Types",[320,321,323],"h3",{"id":322},"t",[117,324,322],{},[242,326,330],{"className":327,"code":328,"language":329,"meta":250,"style":250},"language-elixir shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","@type t() :: %Zocam.Span.Arc{\n  from: Zocam.Point.chain(),\n  left: Zocam.Intervals.closing(),\n  overflow: Zocam.Point.overflow(),\n  right: Zocam.Intervals.closing(),\n  step: Zocam.Span.step() | nil,\n  until: Zocam.Point.chain()\n}\n","elixir",[117,331,332,339,345,351,357,363,369,375],{"__ignoreMap":250},[110,333,336],{"class":334,"line":335},"line",1,[110,337,338],{},"@type t() :: %Zocam.Span.Arc{\n",[110,340,342],{"class":334,"line":341},2,[110,343,344],{},"  from: Zocam.Point.chain(),\n",[110,346,348],{"class":334,"line":347},3,[110,349,350],{},"  left: Zocam.Intervals.closing(),\n",[110,352,354],{"class":334,"line":353},4,[110,355,356],{},"  overflow: Zocam.Point.overflow(),\n",[110,358,360],{"class":334,"line":359},5,[110,361,362],{},"  right: Zocam.Intervals.closing(),\n",[110,364,366],{"class":334,"line":365},6,[110,367,368],{},"  step: Zocam.Span.step() | nil,\n",[110,370,372],{"class":334,"line":371},7,[110,373,374],{},"  until: Zocam.Point.chain()\n",[110,376,378],{"class":334,"line":377},8,[110,379,380],{},"}\n",[382,383],"hr",{},[107,385,386],{},[181,387,388,389,393],{},"Consult ",[122,390,392],{"href":391},"api-reference","api-reference.md"," for complete listing",[395,396,397],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":250,"searchDepth":341,"depth":341,"links":399},[400,401],{"id":199,"depth":341,"text":200},{"id":317,"depth":341,"text":318,"children":402},[403],{"id":322,"depth":347,"text":322},"A directed span between two bounds of the same form, with per-side closings, a step, and an overflow policy.","md",null,{},true,{"title":97,"description":404},"SBO3eyKqnlwmbIT9EK8hvMdahfLLsqkM6WjS3Occuw8",[412,406],{"title":93,"path":94,"stem":95,"description":413,"children":-1},"Sets of instants built from calendar points: arcs, unions, intersections, complements, and ordinal selection.",1786065170047]