src/third_party/v8-3.25/src/i18n.js
/**
 * Returns canonical Area/Location name, or throws an exception if the zone
 * name is invalid IANA name.
 */
Returns canonical Area/Location name, or throws an exception if the zone
name is invalid IANA name.
Returns canonical Area / Location name or throws an exception if the zone name is invalid IANA name .
function canonicalizeTimeZoneID(tzID) {
  if (tzID === undefined) {
    return tzID;
  }
  var upperID = tzID.toUpperCase();
  if (upperID === 'UTC' || upperID === 'GMT' ||
      upperID === 'ETC/UTC' || upperID === 'ETC/GMT') {
    return 'UTC';
  }
  var match = GetTimezoneNameCheckRE().exec(tzID);
  if (IS_NULL(match)) {
    throw new $RangeError('Expected Area/Location for time zone, got ' + tzID);
  }
  var result = toTitleCaseWord(match[1]) + '/' + toTitleCaseWord(match[2]);
  var i = 3;
  while (match[i] !== undefined && i < match.length) {
    result = result + '_' + toTitleCaseWord(match[i]);
    i++;
  }
  return result;
}
function canonicalizeTimeZoneID ( tzID ) { if ( tzID === undefined ) { return tzID ; } var upperID = tzID . toUpperCase ( ) ; if ( upperID === 'UTC' || upperID === 'GMT' || upperID === 'ETC/UTC' || upperID === 'ETC/GMT' ) { return 'UTC' ; } var match = GetTimezoneNameCheckRE ( ) . exec ( tzID ) ; if ( IS_NULL ( match ) ) { throw new $RangeError ( 'Expected Area/Location for time zone, got ' + tzID ) ; } var result = toTitleCaseWord ( match [ 1 ] ) + '/' + toTitleCaseWord ( match [ 2 ] ) ; var i = 3 ; while ( match [ i ] !== undefined && i < match . length ) { result = result + '_' + toTitleCaseWord ( match [ i ] ) ; i ++ ; } return result ; }
Returns canonical Area/Location name, or throws an exception if the zone
 name is invalid IANA name.
Returns canonical Area / Location name or throws an exception if the zone name is invalid IANA name .
// Skip undefined zones. // Special case handling (UTC, GMT). // We expect only _ and / beside ASCII letters. // All inputs should conform to Area/Location from now on.