docs.unity3d.com
    Show / Hide Table of Contents

    Class TimeFormatter

    Provides the ability to format a DateTime or TimeSpan object.

    Inheritance
    Object
    FormatterBase
    TimeFormatter
    Inherited Members
    FormatterBase.Names
    Namespace: UnityEngine.Localization.SmartFormat.Extensions
    Syntax
    public class TimeFormatter : FormatterBase, IFormatter, ISerializationCallbackReceiver

    Constructors

    TimeFormatter()

    Creates a new instance of the formatter.

    Declaration
    public TimeFormatter()

    Properties

    DefaultFormatOptions

    Determines the options for time formatting.

    Declaration
    public TimeSpanFormatOptions DefaultFormatOptions { get; set; }
    Property Value
    Type Description
    UnityEngine.Localization.SmartFormat.Utilities.TimeSpanFormatOptions

    DefaultNames

    Default names to use when Names is null.

    Declaration
    public override string[] DefaultNames { get; }
    Property Value
    Type Description
    String[]
    Overrides
    FormatterBase.DefaultNames

    DefaultTwoLetterISOLanguageName

    The ISO language name, which will be used for getting the UnityEngine.Localization.SmartFormat.Utilities.TimeTextInfo.

    Declaration
    public string DefaultTwoLetterISOLanguageName { get; set; }
    Property Value
    Type Description
    String

    Methods

    TryEvaluateFormat(IFormattingInfo)

    Writes the current value to the output, using the specified format. IF this extension cannot write the value, returns false, otherwise true.

    Declaration
    public override bool TryEvaluateFormat(IFormattingInfo formattingInfo)
    Parameters
    Type Name Description
    IFormattingInfo formattingInfo
    Returns
    Type Description
    Boolean
    Overrides
    FormatterBase.TryEvaluateFormat(IFormattingInfo)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023