Available
amalgame-datetime
Instant ns-UTC, Duration, Stopwatch, ISO 8601.
Overview
Everything is ns-UTC internally — timezone complexity is explicit, not hidden. Instant for timestamps, Duration for intervals, Stopwatch for monotonic measurements. ISO 8601 parsing/formatting.
Features
- ✓
Instant.Now(),Instant.FromIso(s),ToIso() - ✓
Durationin nanoseconds (millis, secs, mins, hours) - ✓Monotonic
Stopwatchfor NTP-immune timings - ✓Explicit timezone (no silent locale fallback)
- ✓Pure Amalgame
Example
Minimal usage example — copy-paste runnable after install.
amc package add datetime
let sw = Stopwatch.Start()
doWork()
let elapsed = sw.Elapsed() // Duration
Console.WriteLine("took " + elapsed.Millis() + "ms")
let t = Instant.FromIso("2026-05-24T10:30:00Z")
At a glance
- License: Apache-2.0
- Install:
amc package add datetime - Source: amalgame-lang/amalgame-datetime
- Official index: amalgame-lang/packages-index