Humanizer.IFractionalTimeSpanHumanizeStrategy
IFractionalTimeSpanHumanizeStrategy Interface
Extends a time-span humanization strategy with fractional-second support.
public interface IFractionalTimeSpanHumanizeStrategy
Methods
IFractionalTimeSpanHumanizeStrategy.HumanizeWithFractionalSeconds(TimeSpan, int, bool, CultureInfo, TimeUnit, string, int, MidpointRounding, bool) Method
Converts a System.TimeSpan into human-readable text with seconds as the minimum unit.
string HumanizeWithFractionalSeconds(System.TimeSpan timeSpan, int precision, bool countEmptyUnits, System.Globalization.CultureInfo? culture, Humanizer.TimeUnit maxUnit, string? collectionSeparator, int maxFractionalDigits, System.MidpointRounding roundingMode, bool toSymbols);
Parameters
timeSpan System.TimeSpan
The time span to humanize.
precision System.Int32
The maximum number of time units to return.
countEmptyUnits System.Boolean
Whether empty time units count toward precision.
culture System.Globalization.CultureInfo
The culture to use. If null, the current culture is used.
maxUnit TimeUnit
The maximum unit of time to output.
collectionSeparator System.String
The separator used to combine time parts. If null, the culture's default collection formatter is used.
maxFractionalDigits System.Int32
The maximum number of fractional-second digits, from 0 through 7.
roundingMode System.MidpointRounding
The midpoint rounding mode.
toSymbols System.Boolean
Whether time units are rendered as symbols.
Returns
System.String
The human-readable time span.