Expreszo.DateTime
0.6.0
dotnet add package Expreszo.DateTime --version 0.6.0
NuGet\Install-Package Expreszo.DateTime -Version 0.6.0
<PackageReference Include="Expreszo.DateTime" Version="0.6.0" />
<PackageVersion Include="Expreszo.DateTime" Version="0.6.0" />
<PackageReference Include="Expreszo.DateTime" />
paket add Expreszo.DateTime --version 0.6.0
#r "nuget: Expreszo.DateTime, 0.6.0"
#:package Expreszo.DateTime@0.6.0
#addin nuget:?package=Expreszo.DateTime&version=0.6.0
#tool nuget:?package=Expreszo.DateTime&version=0.6.0
Expreszo.DateTime
Optional date/time functions for the Expreszo
expression evaluator — 76 functions covering parsing, formatting, arithmetic,
comparison, ranges, and relative-to-now helpers. Backed by the BCL
(DateTimeOffset + TimeZoneInfo) with no external dependencies, and Native
AOT / trim compatible. A faithful port of the TypeScript
@pro-fa/expreszo-datetime plugin.
Install
dotnet add package Expreszo.DateTime
Expreszo comes in transitively. Targets net10.0.
Register
using Expreszo;
using Expreszo.DateTimes;
var parser = Parser.WithPlugins([new ExpreszoDateTimePlugin()]);
parser.Evaluate("format(addDuration('2026-01-01', 7, 'days'), 'yyyy-MM-dd')");
// => Value.String "2026-01-08"
The package/assembly is
Expreszo.DateTime; the code namespace isExpreszo.DateTimes(plural) so it doesn't shadowSystem.DateTime.
Configure the clock and zone
Impure functions (now, today, age, distance/relative helpers) read a clock,
and zone-less values use a "local" zone — both configurable, which is handy for
deterministic tests:
var plugin = new ExpreszoDateTimePlugin(new DateTimeOptions
{
NowProvider = () => DateTimeOffset.Parse("2026-04-15T12:00:00Z"),
DefaultZone = TimeZoneInfo.Utc,
});
var parser = Parser.WithPlugins([plugin]);
parser.Evaluate("daysUntil('2026-04-20T12:00:00Z')"); // => 5
Input shapes
Date arguments accept a Value.DateTime, an ISO 8601 string, a Unix-millisecond
number, or a native System.DateTime/DateTimeOffset passed via the variable
resolver (DateTimeVariables.FromObjects). DateTime values also flow through the
core comparison operators (==, <, >=, …) by instant.
Documentation
Full guide and function reference: https://pro-fa.github.io/expreszo-dotnet/datetime-plugin/
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Expreszo (>= 0.6.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.6.0 | 173 | 6/26/2026 |