No description
Find a file
2026-02-11 17:27:24 +06:00
.github/workflows ci: update zig version 2026-02-11 14:10:42 +06:00
example feat: add wasm32-freestanding target 2026-02-11 16:22:57 +06:00
src test: implement all method tests and skip failing 2026-02-11 17:27:24 +06:00
test test: use arena allocator 2026-02-11 14:26:10 +06:00
.gitignore refactor: migrate to zig 0.16.0-dev 2026-02-11 14:04:50 +06:00
.tool-versions refactor: migrate to zig 0.16.0-dev 2026-02-11 14:04:50 +06:00
build.zig feat: add wasm32-freestanding target 2026-02-11 16:22:57 +06:00
build.zig.zon feat: add wasm32-freestanding target 2026-02-11 16:22:57 +06:00
Cargo.lock refactor: use temporal_rs as pkg 2026-01-26 11:34:26 +06:00
Cargo.toml refactor: use temporal_rs as pkg 2026-01-26 11:34:26 +06:00
LICENCE chore: improve readme 2026-01-26 12:38:42 +06:00
README.md ci: update zig version 2026-02-11 14:10:42 +06:00
SPEC.md fix(Instant): align with spec 2026-01-23 23:57:14 +06:00

Temporalz

CI

A Zig library for working with temporal types based on the Temporal Standard.

Temporalz provides Zig bindings to the Rust-based temporal_rs library for handling dates, times, and durations with proper timezone support.

Installation

Prerequisites

  • Zig 0.16.0-dev.2535+b5bd49460 or later
  • Rust toolchain (only required if prebuilt staticlibs are not available for your platform)

Add as a Dependency

zig fetch --save https://github.com/nurulhudaapon/temporalz/archive/main.tar.gz

Use in build.zig

Add temporalz to your executable in build.zig:

const temporalz = b.dependency("temporalz", .{
    .target = target,
    .optimize = optimize,
});

const exe = b.addExecutable(.{...});

exe.root_module.addImport("temporalz", temporalz.module("temporalz"));

Checklist (Test262)

  • Instant
  • Duration
  • PlainDate
  • PlainTime
  • PlainDateTime
  • PlainYearMonth
  • PlainMonthDay
  • ZonedDateTime

Prebuilt

Prebuilt libraries are included for the following platforms:

  • aarch64-macos
  • x86_64-macos
  • aarch64-linux-gnu
  • x86_64-linux-gnu
  • x86_64-windows-gnu
  • aarch64-windows-gnu

For other platforms, the library will build from source; you need the Rust toolchain installed.

Development

Clone the Repository

git clone https://github.com/nurulhudaapon/temporalz.git
cd temporalz

Build and Run

zig build run

Run Tests

zig build test

License

MIT