Skip to main content
Version: 4.0 (next)

Humanizer.IDateToOrdinalWordConverter

IDateToOrdinalWordConverter Interface​

Converts dates into the localized text used by ToOrdinalWords.

public interface IDateToOrdinalWordConverter

Methods​

IDateToOrdinalWordConverter.Convert(DateTime) Method​

Converts the given date to ordinal words for the current culture.

string Convert(System.DateTime date);
Parameters​

date System.DateTime

The date to format.

Returns​

System.String
The localized ordinal-date string.

IDateToOrdinalWordConverter.Convert(DateTime, GrammaticalCase) Method​

Converts the given date to ordinal words using the specified grammatical case.

string Convert(System.DateTime date, Humanizer.GrammaticalCase grammaticalCase);
Parameters​

date System.DateTime

The date to format.

grammaticalCase GrammaticalCase

The grammatical case to apply when the locale supports case-specific date forms.

Returns​

System.String
The localized ordinal-date string.