import type { PropertyDefs } from "../../support/Serializable.js";
import { SerializableBase } from "../../support/Serializable.js";
import { Time } from "../Time.js";
/**
 * The default set of formats used for parsing time values.
 */
export declare const DEFAULT_PARSING_FORMATS: string[];
/**
 * Default settings that affect how times are formatted and parsed.
 */
export interface TimeSettings {
    /**
     * The default format for formatting times. See
     * {@link utilities/format/time!TimeFormatter.format}.
     */
    defaultFormat?: string;
    /**
     * Either a single format, or one of several possible formats that the input
     * is expected to be in. If specified, the input must _exactly_ match. The
     * syntax is the same as for
     * {@link utilities/format/time!TimeFormatter.format}.
     */
    defaultParseFormat?: string | string[];
}
/**
 * Options supported by {@link format}.
 */
export interface FormatOptions {
    /**
     * The locale to use when formatting the time. If not specified, the current
     * locale is used (see locale module).
     */
    locale?: string;
    /**
     * The time format. See {@link utilities/format/time!TimeFormatter.format}.
     */
    format?: string;
}
/**
 * Options supported by {@link parse}.
 */
export interface ParseOptions {
    /**
     * The locale to use when parsing the time. If not specified, the current
     * locale is used (see locale module).
     */
    locale?: string;
    /**
     * Either a single format, or one of several possible formats that the input
     * is expected to be in. If specified, the input must _exactly_ match. See
     * {@link utilities/format/time!TimeFormatter.format}.
     */
    format?: string | string[];
}
/**
 * Formats a time object representing a specific time.
 *
 * @param time The time to format.
 */
export declare function format(time: Time): string;
/**
 * Formats a time object representing a specific time for display.
 *
 * @param format See {@link utilities/format/time!TimeFormatter.format}.
 * @param time The time to format.
 */
export declare function format(format: string, time: Time): string;
/**
 * Formats a time object representing a specific time for display.
 *
 * @param options Specifies the format settings to use.
 * @param time The time to format.
 */
export declare function format(options: FormatOptions, time: Time): string;
/**
 * Parses a value into a Time object.
 *
 * @param input The input to parse.
 * @returns A Time object corresponding to the input. If unable to parse
 *   successfully, will return an invalid Time.
 */
export declare function parse(input: unknown): Time;
/**
 * Parses a value into a Time object.
 *
 * @param format See {@link ParseOptions.format}.
 * @param input The input to parse.
 * @returns A Time object corresponding to the input. If unable to parse
 *   successfully, will return an invalid Time.
 */
export declare function parse(format: string | string[], input: unknown): Time;
/**
 * Parses a value into a Time object.
 *
 * @param options The options to use for parsing.
 * @param input The input to parse.
 * @returns A Time object corresponding to the input. If unable to parse
 *   successfully, will return an invalid Time.
 */
export declare function parse(options: ParseOptions, input: unknown): Time;
/**
 * Converts an Esri-style date format constant for a time (e.g.
 * "short-date-short-time") to a format string that can be used with
 * {@link format} and {@link parse}.
 *
 * @param format The Esri-style format constant to convert.
 */
export declare function esriFormatToGeocortexFormat(format: string): string;
/**
 * Properties that can be passed into the constructor for
 * {@link utilities/format/time!TimeFormatter}.
 */
export interface TimeFormatterProperties extends TimeSettings {
    /**
     * The locale to use when formatting & parsing the number. If not specified,
     * the current locale is used (see locale module).
     */
    locale?: string;
}
/**
 * A helper class for formatting and parsing times.
 */
export declare class TimeFormatter extends SerializableBase<TimeFormatterProperties> implements TimeSettings {
    /**
     * @inheritDoc
     */
    get defaultFormat(): string | undefined;
    /**
     * @inheritDoc
     */
    set defaultFormat(value: string | undefined);
    /**
     * @inheritDoc
     */
    defaultParseFormat: string | undefined;
    /**
     * The locale to use when formatting & parsing the time. If not specified,
     * the current locale is used (see locale module).
     */
    locale: string | undefined;
    private _defaultFormat;
    /**
     * Formats a time for display.
     *
     * @param time The time to format.
     */
    format(time: Time): string;
    /**
     * Formats a time for display.
     *
     * @param time The time to format.
     * @param format The format for presenting times. One of the
     *   {@link utilities/format/formats!TimeFormat} constants, or a custom
     *   format string. The format string syntax is similar to
     *   {@link https://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx}, with the
     *   following exceptions:
     *
     *   - ":" is treated as a literal character.
     *   - "t" is treated the same as "tt".
     *   - "F", "FF", "FFF" etc. will behave the same as "f", "ff", "fff", etc.
     *       Additionally, a maximum of 3 digits (milliseconds) is supported.
     *       Longer formatters like "fffff" are truncated to 3 digits, rather
     *       than padded with zeros.
     *   - "K" is not supported at all and will be ignored. If not specified, it
     *       will default to TIME_SHORT.
     */
    format(format: string, time: Time): string;
    /**
     * Formats a time for display.
     *
     * @param time The time to format.
     * @param options Options that control how the time is formatted.
     */
    format(options: FormatOptions, time: Time): string;
    /**
     * Parses a value into a Time object.
     *
     * @param input The input to parse.
     * @returns A Time object corresponding to the input. If unable to parse
     *   successfully, will return an invalid Time.
     */
    parse(input: unknown): Time;
    /**
     * Parses a value into a Time object.
     *
     * @param input The input to parse.
     * @param format See {@link ParseOptions.format}.
     * @returns A Time object corresponding to the input. If unable to parse
     *   successfully, will return an invalid Time.
     */
    parse(format: string | string[], input: unknown): Time;
    /**
     * Parses a value into a Time object.
     *
     * @param input The input to parse.
     * @param options The options to use for parsing.
     * @returns A Time object corresponding to the input. If unable to parse
     *   successfully, will return an invalid Time.
     */
    parse(options: ParseOptions, input: unknown): Time;
    protected _getSerializableProperties(): PropertyDefs<TimeFormatterProperties>;
}
/**
 * Default settings used for formatting and parsing times.
 */
export declare const settings: TimeSettings;
