UNPKG

timezonecomplete

Version:

DateTime, TimeZone, Duration and Period library aimed at providing a consistent and complete date-time interface, away from the original JavaScript Date class.

22 lines (21 loc) 911 B
/** * Copyright(c) 2014 ABB Switzerland Ltd. * * Functionality to parse a DateTime object to a string */ import { TimeStruct } from "./basics"; import { PartialLocale } from "./locale"; import { TimeZone } from "./timezone"; /** * Format the supplied dateTime with the formatting string. * * @param dateTime The current time to format * @param utcTime The time in UTC * @param localZone The zone that currentTime is in * @param formatString The LDML format pattern (see LDML.md) * @param locale Other format options such as month names * @return string * @throws timezonecomplete.Argument.FormatString for invalid format pattern * @throws timezonecomplete.InvalidTimeZoneData if values in the time zone database are invalid */ export declare function format(dateTime: TimeStruct, utcTime: TimeStruct, localZone: TimeZone | undefined | null, formatString: string, locale?: PartialLocale): string;