Finance.Tenor 2.1.0

There is a newer version of this package available.
See the version list below for details.
Install-Package Finance.Tenor -Version 2.1.0
dotnet add package Finance.Tenor --version 2.1.0
<PackageReference Include="Finance.Tenor" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Finance.Tenor --version 2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Finance.Tenor, 2.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Finance.Tenor as a Cake Addin
#addin nuget:?package=Finance.Tenor&version=2.1.0

// Install Finance.Tenor as a Cake Tool
#tool nuget:?package=Finance.Tenor&version=2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


  • The best and fast implementation of the finance tenor.
  • Low GC Gen0 memory pressure when parsing millions tenors.
Version 2.1.0
  • Add support comparison operators "<" ">" "==" "!=" ">=" "<=".
  • Supported 1y == 12m
  • Supported 1m == 30d
  • Supported 1w == 7d
Version 2.0.0
  • NetStandard 2.0
  • Net 4.7.2
  • Net 4.6.2
  • Net 4.5.2


Tenor in finance can have multiple usages, but it most commonly refers to the amount of time left for the repayment of a loan or until a financial contract expires. It is most commonly used for non - standardized contracts, such as foreign exchange and interest rate swaps, while the term "maturity" is usually used to express the same concept for government bonds and corporate bonds. Tenor can also refer to the payment frequency on an interest rate swap.

The tenor string can be in the following formats:

  • Xd = X day;
  • Yw = Y week
  • Ym = Z month
  • Gy = G year
  • or any combinations of above


  • 1w6d
  • 1y6m
  • 1w1d
  • 1y6m2d5w

Code usage examples:

    // Create  tenor "1y1m1w1d"
    Tenor tenor = new Tenor(1, 1, 1, 1);
    // Parse  tenor 
    string tenor = "1m1w1d1y";
    Tenor res =Tenor.Parse(tenor);
    // Compare  tenors 
    string tenor1w = "1w";
    string tenor7d = "7d";
    Tenor t1w =Tenor.Parse(tenor1w);
    Tenor t7d =Tenor.Parse(tenor7d);

    if( t1w == 7d)

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETFramework 4.5.2

    • No dependencies.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETStandard 2.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
3.0.0 290 11/8/2020
2.1.0 354 2/24/2019
2.0.0 320 2/20/2019

Low temporary memory usage/allocations, i.e. Low GC/CLR Gen0 memory pressure.
     Ultra fast parsing.
     Multi-target frameworks.
     Supports comparison operations.