Table of Contents

Class TimeAddon

Namespace
Uncreated.Warfare.Translations.Addons
Assembly
Uncreated.Warfare.dll

Converts arguments to time strings.

public sealed class TimeAddon : IArgumentAddon
Inheritance
TimeAddon
Implements
Inherited Members

Properties

DisplayName

public string DisplayName { get; }

Property Value

string

Instance

public static TimeAddon Instance { get; }

Property Value

TimeAddon

Methods

ApplyAddon(ITranslationValueFormatter, string, TypedReference, in ValueFormatParameters)

public string ApplyAddon(ITranslationValueFormatter formatter, string text, TypedReference value, in ValueFormatParameters args)

Parameters

formatter ITranslationValueFormatter
text string
value TypedReference
args ValueFormatParameters

Returns

string

Create(DateTimeFormatType)

Create a DateTime format using the given format style.

public static ArgumentFormat Create(DateTimeFormatType spanFormatType)

Parameters

spanFormatType DateTimeFormatType

Returns

ArgumentFormat

Create(TimeSpanFormatType)

Create a TimeSpan format using the given format style.

public static ArgumentFormat Create(TimeSpanFormatType spanFormatType)

Parameters

spanFormatType TimeSpanFormatType

Returns

ArgumentFormat

ToLongTimeString(TimeTranslations, int, LanguageInfo)

Converts to a string in the form of '1 hour and 10 minutes', etc. It will provide up to two figures.

public static string ToLongTimeString(TimeTranslations timeTranslations, int seconds, LanguageInfo language)

Parameters

timeTranslations TimeTranslations
seconds int
language LanguageInfo

Returns

string

Operators

implicit operator ArgumentFormat(TimeAddon)

public static implicit operator ArgumentFormat(TimeAddon addon)

Parameters

addon TimeAddon

Returns

ArgumentFormat