Finance.Tenor 2.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Finance.Tenor --version 2.1.0
NuGet\Install-Package Finance.Tenor -Version 2.1.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="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
#r "nuget: Finance.Tenor, 2.1.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 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

Finance.Tenor

  • 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

Nuget.org

Tenor

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

Examples:

  • 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)
    {
    
    }

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in 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 602 11/8/2020
2.1.0 609 2/24/2019
2.0.0 554 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.