[{"data":1,"prerenderedAt":359},["ShallowReactive",2],{"navigation_docs":3,"-api-zocam-iso":101,"-api-zocam-iso-surround":354},[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":81,"body":103,"description":347,"extension":348,"links":349,"meta":350,"navigation":351,"path":82,"seo":352,"stem":83,"__hash__":353},"docs\u002F3.api\u002Fzocam-iso.md",{"type":104,"value":105,"toc":335},"minimark",[106,129,138,145,178,185,190,204,207,211,221,230,234,240,253,260,264,270,279,293,303,309,312,318,321,331],[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\u002Fiso.ex#L3",[126],[136],"source-link","Source on GitHub ↗",[107,139,140,141,144],{},"One calendar, checked at the door: ",[117,142,143],{},"Calendar.ISO",".",[107,146,147,148,150,151,154,155,158,159,161,162,165,166,169,170,174,175,177],{},"Every number in this library is an ISO number. ",[117,149,85],{}," maps\n",[117,152,153],{},":january"," to 1 and ",[117,156,157],{},":monday"," to 1. ",[117,160,93],{}," then does cell\narithmetic on those numbers. A ",[117,163,164],{},"%Date{}"," or a ",[117,167,168],{},"%Time{}"," on a\ndifferent calendar has the same ",[171,172,173],"em",{},"shape",", thus it matches a ",[117,176,164],{},"\npattern, but its numbers mean something else. Before this module\nexisted, such a value was accepted and the library gave a wrong\nanswer with no crash and no warning.",[107,179,180,181,184],{},"This module holds the assumption in one place. Each function that\ntakes a calendar value from the caller calls ",[117,182,183],{},"check!\u002F2"," before any\nnumber is read.",[186,187,189],"h2",{"id":188},"why-identity-and-not-compatibility","Why identity, and not compatibility",[107,191,192,193,196,197,200,201,203],{},"The standard library has a weaker test,\n",[117,194,195],{},"Calendar.compatible_calendars?\u002F2",": two calendars are compatible when\nthey agree on the structure of a day and of a time. That is not\nsufficient here, because compatible calendars can still ",[171,198,199],{},"number","\ndifferently. The Holocene calendar in Elixir's own test suite is\ncompatible with ISO and writes the year 2026 as 12026. zocam reads\nthe number, thus only ",[117,202,143],{}," itself is safe.",[107,205,206],{},"The price is that a calendar which agrees with ISO in every number is\nrefused too. Nothing in this tree builds one, so the price is zero.",[186,208,210],{"id":209},"where-the-doors-are","Where the doors are",[212,213,218],"pre",{"className":214,"code":216,"language":217},[215],"language-text","Zocam.Point.time\u002F1,  Point.new!\u002F1  ── the :time segment\nZocam.Point.every\u002F3, Point.new!\u002F1  ── the {:every, ...} anchor\nZocam.Span.absolute!\u002F1             ── both bounds\nZocam.Span.ground\u002F3, empty?\u002F3      ── both horizon bounds\nZocam.Span.member?\u002F2               ── the instant\nZocam.Span.stream\u002F3                ── the start instant\n","text",[117,219,216],{"__ignoreMap":220},"",[107,222,223,224,226,227,229],{},"An arc bound is a ",[117,225,85],{},", thus the two Point doors already\ncover it. ",[117,228,77],{}," is the linear kernel: it compares\ninstants and never reads a calendar number, so it needs no door.",[186,231,233],{"id":232},"types","Types",[235,236,238],"h3",{"id":237},"calendared",[117,239,237],{},[212,241,245],{"className":242,"code":243,"language":244,"meta":220,"style":220},"language-elixir shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","@type calendared() :: Date.t() | Time.t() | NaiveDateTime.t() | DateTime.t()\n","elixir",[117,246,247],{"__ignoreMap":220},[110,248,251],{"class":249,"line":250},"line",1,[110,252,243],{},[107,254,255,256,259],{},"A standard-library value that carries a ",[117,257,258],{},":calendar"," field. These four\nare the only values that can enter zocam with a calendar attached.",[186,261,263],{"id":262},"functions","Functions",[235,265,267],{"id":266},"check",[117,268,269],{},"check!",[212,271,273],{"className":242,"code":272,"language":244,"meta":220,"style":220},"@spec check!(calendared(), String.t()) :: :ok\n",[117,274,275],{"__ignoreMap":220},[110,276,277],{"class":249,"line":250},[110,278,272],{},[107,280,281,282,285,286,288,289,292],{},"Answer ",[117,283,284],{},":ok"," when the value is on ",[117,287,143],{},", or raise an\n",[117,290,291],{},"ArgumentError"," that names the place, the calendar, and the repair.",[107,294,295,298,299,302],{},[117,296,297],{},"where"," is a short phrase that names the place in the caller's own\nwords, such as ",[117,300,301],{},"\"the every\u002F3 anchor\"",". It opens the message, so write\nit as the subject of a sentence.",[212,304,307],{"className":305,"code":306,"language":217},[215],"iex> Zocam.ISO.check!(~T[09:00:00], \"the :time segment\")\n:ok\n\niex> Zocam.ISO.check!(~U[2026-05-15 09:00:00Z], \"the horizon\")\n:ok\n",[117,308,306],{"__ignoreMap":220},[107,310,311],{},"A value on any other calendar raises. The repair names the converter\nof the value's own type:",[212,313,316],{"className":314,"code":315,"language":217},[215],"iex> Zocam.ISO.check!(%Date{calendar: Holocene, year: 12026, month: 5, day: 15}, \"the anchor\")\n** (ArgumentError) the anchor is on Holocene, but zocam reads every calendar number as ISO. Convert it first: Date.convert!(value, Calendar.ISO).\n",[117,317,315],{"__ignoreMap":220},[319,320],"hr",{},[107,322,323],{},[171,324,325,326,330],{},"Consult ",[122,327,329],{"href":328},"api-reference","api-reference.md"," for complete listing",[332,333,334],"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":220,"searchDepth":336,"depth":336,"links":337},2,[338,339,340,344],{"id":188,"depth":336,"text":189},{"id":209,"depth":336,"text":210},{"id":232,"depth":336,"text":233,"children":341},[342],{"id":237,"depth":343,"text":237},3,{"id":262,"depth":336,"text":263,"children":345},[346],{"id":266,"depth":343,"text":269},"One calendar, checked at the door: Calendar.ISO.","md",null,{},true,{"title":81,"description":347},"TuK1GqfyjBz7CNZOBl8It5Yg8IeOTMvVt5b8TDVgvKA",[355,357],{"title":77,"path":78,"stem":79,"description":356,"children":-1},"The linear kernel: sets of concrete intervals on one axis, with union, intersection, complement, and difference.",{"title":85,"path":86,"stem":87,"description":358,"children":-1},"A calendar point: a concrete or abstract \"thing about time\".",1786065169621]