Quantum.Tempo is a powerful, calendar-agnostic .NET library for intuitive and ISO-compliant manipulation of dates, times, intervals, and durations. It supports Gregorian, Persian (Shamsi), Hijri, and custom calendars using a clean, string-based API. Features include recurrence rules (RRULE), interval algebra, duration arithmetic, fuzzy date parsing, time zone support, and a REPL CLI for exploration.
$ dotnet add package Quantum.TempoQuantum.Tempo is a .NET date/time framework focused on simple, string-based, calendar-agnostic manipulation of dates, times, intervals, and durations. It supports multiple calendar systems (Gregorian, Persian/Shamsi, Hijri/Arabic, and custom) and is designed for robust, human-friendly, and ISO-compliant operations.
// Parse and normalize
"1402/02/01".AutoNormalizeToIsoDateString(); // "2023-04-21"
// Next date, week, month
"2024-05-01".NextDate();
"2024-05-01".NextWeek();
// Duration arithmetic
"2024-05-01".AddDuration("P3D");
// Interval algebra
Interval.Union("2024-01-01/2024-01-10", "2024-01-05/2024-01-15");
// Recurrence
StringExtensions.ParseRRule("FREQ=WEEKLY;BYDAY=MO,WE,FR;COUNT=4", "2024-05-01");
// Pluggable calendar
CalendarProviderRegistry.Register(new SampleFiscalCalendarProvider());
// CLI playground
// dotnet run --project src/Tempo.Cli -- parse "1402/02/01"
docs/USAGE.md for detailed usage and extensionCONTRIBUTING.md and open issues/PRsdotnet test to verify all featuresExplore all Quantum.Tempo features interactively using the REPL playground:
dotnet run --project src/Tempo.ReplType help in the REPL for available commands. See docs/FEATURES.md for details and HOWTO-REPL.md for a full how-to guide.
MIT