zocam — composable time for Elixir
Guide

Getting started

Add zocam to a Mix project, run its tests, and build its documentation.

AI SLOP An AI agent wrote this page. yuri4n, a senior engineer, gave the direction and did the review. The review is human, thus errors can stay.

Install

You want to use zocam in a Mix project. Do these steps.

Zocam is published on Hex. Add it to the dependencies in your mix.exs:

def deps do
  [
    {:zocam, "~> 0.1"}
  ]
end

Then fetch it:

mix deps.get

Then prove the install with a first question. Start iex -S mix and ask whether May 15 2026 is in May:

iex> Zocam.Span.member?(Zocam.Span.of(Zocam.Point.month(:may)), ~U[2026-05-15 12:00:00Z])
true

The full module reference also lives on hexdocs.pm/zocam — the same content as the API reference here, rendered by ExDoc. Its examples are doctests, so you can paste any of them into the same iex session.

Work on the library itself

You want to change zocam, or run its tests. Do these steps.

The library needs Elixir 1.20.2 on Erlang/OTP 29. The repository pins these versions in mise.toml; with mise installed, run mise install in the repository root and you get the correct versions.

git clone https://github.com/yuri4n/zocam.git
cd zocam
mix deps.get
mix test

mix test must stay green at all times. The library has no stub backlog: every public function is implemented, and the tests state its semantics.

Build the documentation

You want to build the reference, or run this site on your machine. Do these steps.

mix docs

ExDoc writes the reference to doc/. This website ingests that same output: docs/ is a Nuxt application, and docs/scripts/ingest-exdoc.mjs transforms the ExDoc markdown and the ADR sources into the pages you read here.

cd docs
pnpm install
pnpm dev

The site needs Node.js 22 or newer, plus pnpm.

Release (for the maintainer)

A release is one tag push. GitHub Actions checks that the tag equals the version in mix.exs, runs the tests, and publishes the package to Hex.pm — which also publishes the docs to hexdocs.pm:

git tag v0.1.0 && git push origin v0.1.0
Copyright © 2026