Skip to content

Latest commit

 

History

History
54 lines (33 loc) · 3.15 KB

File metadata and controls

54 lines (33 loc) · 3.15 KB

IGrammaticalCaseTimeSpanFormatter Interface

Optionally extends a locale formatter with grammatical-case-aware duration phrases.

public interface IGrammaticalCaseTimeSpanFormatter : Humanizer.IFormatter

Derived
DefaultFormatter

Implements IFormatter

Methods

IGrammaticalCaseTimeSpanFormatter.TimeSpanHumanize(TimeUnit, int, GrammaticalCase) Method

Returns the locale-authored unit-case phrase for a duration count.

string TimeSpanHumanize(Humanizer.TimeUnit timeUnit, int unit, Humanizer.GrammaticalCase grammaticalCase);

Parameters

timeUnit TimeUnit

The unit being described.

unit System.Int32

The number of units being described.

grammaticalCase GrammaticalCase

The grammatical case used to select the unit phrase.

Returns

System.String
A locale-authored phrase whose count may be explicit or encoded by the unit form.

Exceptions

System.ArgumentOutOfRangeException
timeUnit or grammaticalCase is outside its defined enum range.

System.NotSupportedException
The locale or duration unit does not have verified support for grammaticalCase.