Chrononuensis 0.19.0

dotnet add package Chrononuensis --version 0.19.0                
NuGet\Install-Package Chrononuensis -Version 0.19.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Chrononuensis" Version="0.19.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chrononuensis --version 0.19.0                
#r "nuget: Chrononuensis, 0.19.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Chrononuensis as a Cake Addin
#addin nuget:?package=Chrononuensis&version=0.19.0

// Install Chrononuensis as a Cake Tool
#tool nuget:?package=Chrononuensis&version=0.19.0                

Chrononuensis

Logo

Chrononuensis is a library for parsing complex time periods like year-month, year-quarter, month-week, and year-week. Effortlessly decode and validate non-standard formats, handle fiscal calendars, ordinal days, and custom cycles. Lightweight, flexible, and precise, it structures time data with ease.

About | Installing | Quickstart

About

Social media: website twitter badge

Releases: GitHub releases nuget GitHub Release Date licence badge

Dev. activity: GitHub last commit Still maintained GitHub commit activity

Continuous integration builds: Build status Tests CodeFactor codecov

Status: stars badge Bugs badge Top language

Installing

Using .NET CLI

Creating a new reference using .NET CLI If you’re using the .NET command-line interface (CLI), open a terminal in your project’s root directory and run:

dotnet add package Chrononuensis

This will:

  • Add the Chrononuensis package to your project.
  • Update the csproj file to include it as a dependency.

More info

Quick-start

Use the structures

Structs in Chrononuensis are lightweight data structures designed to hold parsed data. They are optimized for performance and memory efficiency. They are immutable where possible, ensuring data integrity.

Manually create a struct by passing values

You can create a struct directly by passing its required values to the constructor.

Chrononuensis follows a consistent parameter ordering for struct constructors and parsers. This order follows a decreasing specificity pattern, similar to how DateTime works in .NET. i.e. for the YearMonth struct, Year comes before Month, following a logical decreasing order.

// Create a Year-Month period for July 2025
var yearMonth = new YearMonth(2025, 7);
Parsing from a string

Instead of manually creating a struct, you can parse a formatted string to obtain a struct.

If you have a formatted string “2025-08” and want to convert it into a YearMonth struct, use the Parse method:

// Parse a period Year-Month for August 2025
var other = YearMonth.Parse("2025-08", "yyyy-MM");

In this example,

  • 2025-08 is the input string.
  • yyyy-MM is the format that defines how the input should be interpreted.

The parser extracts year and month from the string and returns a YearMonth struct.

Use the parsers

Parsers in Chrononuensis are flexible tools that extract structured information from input strings. Their role is not to instantiate predefined structs or classes, but rather to return extracted components (as integers) so that you can use them to create your own structures.

Instead of returning a predefined struct, a parser simply extracts and returns individual components. For example, given an input string like "2025-08":

var parser = new YearMonthParser();
(int year, int month) = parser.Parse("2025-08", "yyyy-MM");

More info

List of supported structures and parsers

Chrononuensis provides a set of predefined structures for parsing and representing date-based information.

  • MonthDay
  • YearDay
  • YearWeek
  • YearMonth
  • YearQuarter
  • YearSemester

More info

List of supported format specifiers

  • Year: yy and yyyy
  • Semester: S
  • Quarter: q
  • Month: M, MM, MMM, MMMM
  • Week: w, ww
  • Day of Year: j and jjj
  • Day: d, dd

More info

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.19.0 99 2/9/2025
0.18.0 77 2/9/2025
0.17.0 138 2/4/2025
0.16.0 67 2/4/2025
0.15.0 108 2/3/2025
0.14.0 78 2/2/2025
0.13.0 101 2/1/2025
0.12.0 67 2/1/2025
0.11.0 69 2/1/2025
0.10.0 66 2/1/2025
0.9.0 59 2/1/2025
0.8.0 64 2/1/2025
0.7.0 67 2/1/2025
0.6.0 63 1/31/2025
0.5.0 63 1/28/2025
0.4.0 57 1/28/2025
0.3.0 65 1/25/2025
0.2.3 64 1/25/2025
0.2.2 71 1/25/2025
0.2.0 73 1/25/2025