Disponible
amalgame-datetime
Instant ns-UTC, Duration, Stopwatch, ISO 8601.
Vue d'ensemble
Tout est ns-UTC en interne — la complexité timezone est explicite, pas cachée. Instant pour les timestamps, Duration pour les écarts, Stopwatch pour les mesures monotoniques. Parsing/formatting ISO 8601.
Caractéristiques
- ✓
Instant.Now(),Instant.FromIso(s),ToIso() - ✓
Durationen nanosecondes (millis, secs, mins, hours) - ✓
Stopwatchmonotonique pour timings non affectés par NTP - ✓Timezone explicite (pas de fallback locale silencieux)
- ✓Pure Amalgame
Exemple
Exemple minimal d'utilisation — recopiable tel quel après l'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")
En bref
- Licence : Apache-2.0
- Installation :
amc package add datetime - Code source : amalgame-lang/amalgame-datetime
- Index officiel : amalgame-lang/packages-index