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 0 | 0 | 0 |
| 0.6.0 | 0 | 0 | 0 | 0 | 0 |
| 0.5.0 | 0 | 0 | 0 | 0 | 0 |
| 0.4.1 | 0 | 0 | 0 | 0 | 0 |
| 0.4.0 | 0 | 0 | 0 | 0 | 0 |
| 0.3.2 | 0 | 0 | 0 | 0 | 0 |
| 0.3.1 | 0 | 0 | 0 | 0 | 0 |
| 0.3.0 | 0 | 0 | 0 | 0 | 0 |
| 0.2.0 | 0 | 0 | 0 | 0 | 0 |
| 0.1.0 | 0 | 0 | 0 | 0 | 0 |
3.0.10 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseHumanizer is a .NET library for turning strings, enums, dates, times, durations, numbers, quantities, and collections into human-friendly text.
dotnet add package HumanizerSelect your Humanizer version in the documentation site for version-correct package, framework, and API guidance.
using System.Globalization;
using Humanizer;
var culture = CultureInfo.GetCultureInfo("en-US");
var text = TimeSpan.FromMinutes(2).Humanize(culture: culture);
var indianNumber = 1_000_000_000L.ToIndianWords(IndianScaleStyle.CroreBased);
var precise = TimeSpan.FromMilliseconds(1500).HumanizeWithFractionalSeconds(
precision: 1,
maxFractionalDigits: 3,
roundingMode: MidpointRounding.ToEven,
culture: culture,
maxUnit: TimeUnit.Second);
Console.WriteLine(text); // 2 minutes
Console.WriteLine(indianNumber); // one hundred crore
Console.WriteLine(precise); // 1.5 seconds
var german = CultureInfo.GetCultureInfo("de-DE");
var duration = TimeSpan.FromDays(7).HumanizeWithCase(
GrammaticalCase.Dative,
culture: german);
Console.WriteLine($"in {duration}"); // in einer WocheIn v4 previews, applications can provide the exact noun forms for a culture's CLDR cardinal categories:
var files = new PluralizationForms(
singular: "plik",
other: "pliku",
few: "pliki",
many: "plików");
if (files.TryPluralize(5m, CultureInfo.GetCultureInfo("pl"), out var noun))
Console.WriteLine(noun); // plikówTryPluralize uses the required cardinal rule for every supported culture and
returns false when the selected form was not supplied. TrySingularize
resolves any exact form in the same set. See
inflection and quantities
for examples.
HumanizeWithCase returns only the duration phrase; add any required
preposition yourself. Singular forms may include a locale-authored one-word
or article, and a locale may encode a count in the unit form. Locales and custom
components without verified case support throw NotSupportedException
instead of falling back to English.
V4 previews also provide opt-in decimal SI and binary IEC byte-size APIs:
var size = ByteSize.FromBytes(1_000_000);
Console.WriteLine(size.Format(ByteSizeUnitSystem.DecimalSi)); // 1 MB
Console.WriteLine(size.Format(ByteSizeUnitSystem.BinaryIec)); // 976.56 KiBLegacy byte-size APIs keep their established unit factors. See byte sizes and rates for explicit formatting, parsing, composites, and rates.
The main library is in src/Humanizer, and its xUnit tests are in tests/Humanizer.Tests. Read the contribution guide before sending a change.
Humanizer is available under the MIT license.