public string ToString(string format, IFormatProvider formatProvider) { if (LegacyMode) { return(TimeSpanFormat.Format(this, null, null)); } return(TimeSpanFormat.Format(this, format, formatProvider)); }
protected internal override void UpdateValueString() { if (Value.HasValue) { var ts = Value.Value; if (Max > TimeSpan.Zero && ts > Max) { Value = Max; return; } if (!string.IsNullOrEmpty(ValueStringFormat)) { ValueString = TimeSpanFormat.Format(ts, ValueStringFormat); return; } } ValueString = string.Format(CultureInfo.CurrentCulture, ValueStringFormat ?? ValueStringFormatFallback, Value); }
public string ToString(string?format, IFormatProvider?formatProvider) { return(TimeSpanFormat.Format(this, format, formatProvider)); }
public string ToString(string?format) { return(TimeSpanFormat.Format(this, format, null)); }
public String ToString(String format, IFormatProvider formatProvider) { return(TimeSpanFormat.Format(this, format, formatProvider)); }
public override String ToString() { return(TimeSpanFormat.Format(this, null, null)); }
public string ToString([StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string?format, IFormatProvider?formatProvider) { return(TimeSpanFormat.Format(this, format, formatProvider)); }
public string ToString([StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string?format) { return(TimeSpanFormat.Format(this, format, null)); }
public string ToString(string format) { return(TimeSpanFormat.Format(this, format, (IFormatProvider)null)); }
public override string ToString() { return(TimeSpanFormat.Format(this, (string)null, (IFormatProvider)null)); }