Function format

  • Format the supplied dateTime with the formatting string.

    Parameters

    • dateTime: TimeStruct

      The current time to format

    • utcTime: TimeStruct

      The time in UTC

    • localZone: undefined | null | TimeZone

      The zone that currentTime is in

    • formatString: string

      The LDML format pattern (see LDML.md)

    • locale: PartialLocale = {}

      Other format options such as month names

    Returns string

    string

    Throws

    timezonecomplete.Argument.FormatString for invalid format pattern

    Throws

    timezonecomplete.InvalidTimeZoneData if values in the time zone database are invalid

Generated using TypeDoc