DateTimeCache 1.1.1

dotnet add package DateTimeCache --version 1.1.1
                    
NuGet\Install-Package DateTimeCache -Version 1.1.1
                    
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="DateTimeCache" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DateTimeCache" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="DateTimeCache" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DateTimeCache --version 1.1.1
                    
#r "nuget: DateTimeCache, 1.1.1"
                    
#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.
#:package DateTimeCache@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DateTimeCache&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=DateTimeCache&version=1.1.1
                    
Install as a Cake Tool

DateTimeCache

.NET C# Platform Stars Forks Issues Last Commit License

A lightweight C# library that provides a lean and fast cache object that provides access to date and time related values that are expensive to calculate, like business hours in a week, month or year, weekdays in a week, month or year, first monday of month, first weekday of month et cetera. It also provides a clear separation between ordinal (year and month) and ISO 8601 week numbers and their differing bounds. It is geared towards supporting planning and scheduling type scenarios where it is needed to have a clear and performant grip on date ranges and all kinds of values like days, hours, holidays.


✨ Features

  • High-Performance Caching: Caches expensive date and time calculations for rapid retrieval.
  • Business Hours Calculation: Determines the number of business hours in a given week, month, or year.
  • Weekday Calculation: Calculates the number of weekdays within a specific week, month, or year.
  • First Day of Month Calculation: Easily find the first occurrence of a specific weekday in a month (e.g., the first Monday, week day or business day).
  • ISO 8601 Week Support: Provides clear and distinct handling of ISO 8601 week numbers and their boundaries.
  • Ordinal Date System Support: Works seamlessly with standard year, month, and day numbering.
  • Date Range Operations: Offers performant and intuitive control over date ranges.
  • Holiday Tracking: Includes capabilities for managing configurable holidays and non-working days.
  • Optimized for Scheduling: Specifically designed to support planning and scheduling applications.
  • Lightweight and Lean: A minimal library with a small footprint, focused on performance.
  • Accurate Week Boundary Detection: Differentiates between ordinal and ISO 8601 week definitions to avoid common off-by-one errors.
  • Flexible Time Value Access: Provides a strong grip on various time-based values like days, hours, and custom-defined periods.
  • AOT compatible: The library is AOT compatible and trimmable

🖥️ Requirements

Requirement Version
OS Windows 10 / 11 (x64)
Runtime .NET 10 Desktop Runtime

🚀 Getting Started

NuGet

PM> Install-Package DateTimeCache

or

dotnet add package DateTimeCache --version 1.1.1

Manual download

  1. Download the latest version from the Releases page.
  2. Add a reference to DateTimeCache.dll to your project.

🤝 Contributing

Contributions are welcome! Please open an issue first to discuss what you would like to change, then submit a pull request.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

📄 License

Distributed under the Creative Commons CC0 1.0 Universal License. See License for details.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

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
1.1.1 121 7/30/2026
1.1.0 123 7/2/2026
1.0.0 120 6/24/2026

All rights released