src/third_party/mozjs-38/extract/js/src/builtin/Date.js
/**
 * Format this Date object into a time string, using the locale and formatting
 * options provided.
 *
 * Spec: ECMAScript Language Specification, 5.1 edition, 15.9.5.7.
 * Spec: ECMAScript Internationalization API Specification, 13.3.3.
 */
Format this Date object into a time string, using the locale and formatting
options provided.


Format this Date object into a time string using the locale and formatting options provided .
function Date_toLocaleTimeString() {
    var x = callFunction(std_Date_valueOf, this);
    if (Number_isNaN(x))
        return "Invalid Date";
    var locales = arguments.length > 0 ? arguments[0] : undefined;
    var options = arguments.length > 1 ? arguments[1] : undefined;
    var dateTimeFormat;
    if (locales === undefined && options === undefined) {
        if (dateTimeFormatCache.timeFormat === undefined) {
            options = ToDateTimeOptions(options, "time", "time");
            dateTimeFormatCache.timeFormat = intl_DateTimeFormat(locales, options);
        }
        dateTimeFormat = dateTimeFormatCache.timeFormat;
    } else {
        options = ToDateTimeOptions(options, "time", "time");
        dateTimeFormat = intl_DateTimeFormat(locales, options);
    }
    return intl_FormatDateTime(dateTimeFormat, x);
}
function Date_toLocaleTimeString ( ) { var x = callFunction ( std_Date_valueOf , this ) ; if ( Number_isNaN ( x ) ) return "Invalid Date" ; var locales = arguments . length > 0 ? arguments [ 0 ] : undefined ; var options = arguments . length > 1 ? arguments [ 1 ] : undefined ; var dateTimeFormat ; if ( locales === undefined && options === undefined ) { if ( dateTimeFormatCache . timeFormat === undefined ) { options = ToDateTimeOptions ( options , "time" , "time" ) ; dateTimeFormatCache . timeFormat = intl_DateTimeFormat ( locales , options ) ; } dateTimeFormat = dateTimeFormatCache . timeFormat ; } else { options = ToDateTimeOptions ( options , "time" , "time" ) ; dateTimeFormat = intl_DateTimeFormat ( locales , options ) ; } return intl_FormatDateTime ( dateTimeFormat , x ) ; }
Format this Date object into a time string, using the locale and formatting
 options provided.
Format this Date object into a time string using the locale and formatting options provided .
// Steps 1-2.  Note that valueOf enforces "this time value" restrictions. // Steps 3-4. // Step 5-6. // This cache only optimizes for the old ES5 toLocaleTimeString without // locales and options. // Step 7.