Skaar.Fodselsnummer 1.1.4

dotnet add package Skaar.Fodselsnummer --version 1.1.4
                    
NuGet\Install-Package Skaar.Fodselsnummer -Version 1.1.4
                    
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="Skaar.Fodselsnummer" Version="1.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Skaar.Fodselsnummer" Version="1.1.4" />
                    
Directory.Packages.props
<PackageReference Include="Skaar.Fodselsnummer" />
                    
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 Skaar.Fodselsnummer --version 1.1.4
                    
#r "nuget: Skaar.Fodselsnummer, 1.1.4"
                    
#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.
#addin nuget:?package=Skaar.Fodselsnummer&version=1.1.4
                    
Install Skaar.Fodselsnummer as a Cake Addin
#tool nuget:?package=Skaar.Fodselsnummer&version=1.1.4
                    
Install Skaar.Fodselsnummer as a Cake Tool

Fødselsnummer 🇳🇴

This package is an implementation of the Norwegian identity number.

The type Skaar.Fodselsnummer has validation logic to parse a string containing a Norwegian id-number.

The type Skaar.DNummer represents a d-number.

The type Skaar.DufNummer represents a DUF-number.

The type Skaar.IdNumber may represent any of the numbers.

  • With JsonConverter and type converter
  • Parsing includes validation logic
  • Equality and comparison
  • Can create new random valid values (for testing purposes).

Skaar.Utils.IdNumberFactory can be used to create new random values.

Usage:

var rawInput = "23072388054";
var number = Fodselsnummer.CreateNew(rawInput); //alt. use Parse or TryParse
var validity = number.IsValid;
var birthDate = number.BirthDate;
var result = number.ToString();

Icon

Product Compatible and additional computed target framework versions.
.NET 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
1.1.4 155 4/6/2025
1.1.3 150 4/6/2025
1.1.2 149 4/6/2025
1.1.1 95 4/5/2025
1.1.0 89 4/5/2025
1.0.0 82 4/5/2025

0.1.0: Initial
           1.0.0: Id-numbers and org number
           1.1.0: Account number
           1.1.1: Fix package name
           1.1.2: Optimizations
           1.1.3: Icons (fix)
           1.1.4: Use ReadOnlyMemory as internal state