Skip to main content
Version: 3.0.1

Humanizer.ResourceKeys.TimeSpanHumanize

ResourceKeys.TimeSpanHumanize Class

Encapsulates the logic required to get the resource keys for TimeSpan.Humanize Examples: TimeSpanHumanize_SingleMinute, TimeSpanHumanize_MultipleHours.

public static class ResourceKeys.TimeSpanHumanize

Inheritance System.Object → TimeSpanHumanize

Methods

ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit, int, bool) Method

Generates Resource Keys according to convention.

public static string GetResourceKey(Humanizer.TimeUnit unit, int count=1, bool toWords=false);

Parameters

unit TimeUnit

Time unit, TimeUnit.

count System.Int32

Number of units, default is One.

toWords System.Boolean

Result to words, default is false.

Returns

System.String
Resource key, like TimeSpanHumanize_SingleMinute