ne==="Etc/Unknown"){
throw %make_range_error(207,bR);
}
%MarkAsInitializedIntlObjectOfType(bT,'dateformat');
bT[u]=ai;
return bT;
}
function DateTimeFormatConstructor(){
return IntlConstruct(this,g,CreateDateTimeFormat,
new.target,arguments,true);
}
%SetCode(g,DateTimeFormatConstructor);
%DefineMethodsInternal(g.prototype,class{resolvedOptions(){
var bH=Unwrap(this,'dateformat',g,
'resolvedOptions',true);
var bU={
'gregorian':'gregory',
'ethiopic-amete-alem':'ethioaa'
};
var bV=fromLDMLString(bH[u][t]);
var bW=bU[bH[u].calendar];
if((bW===(void 0))){
bW=bH[u].calendar;
}
var aF={
locale:bH[u].locale,
numberingSystem:bH[u].numberingSystem,
calendar:bW,
timeZone:bH[u].timeZone
};
addWECPropertyIfDefined(aF,'timeZoneName',bV.timeZoneName);
addWECPropertyIfDefined(aF,'era',bV.era);
addWECPropertyIfDefined(aF,'year',bV.year);
addWECPropertyIfDefined(aF,'month',bV.month);
addWECPropertyIfDefined(aF,'day',bV.day);
addWECPropertyIfDefined(aF,'weekday',bV.weekday);
addWECPropertyIfDefined(aF,'hour12',bV.hour12);
addWECPropertyIfDefined(aF,'hour',bV.hour);
addWECPropertyIfDefined(aF,'minute',bV.minute);
addWECPropertyIfDefined(aF,'second',bV.second);
return aF;
}},-1);
%DefineMethodsInternal(g,class{supportedLocalesOf(B){
return supportedLocalesOf('dateformat',B,arguments[1]);
}},-1);
function formatDate(bI,bX){
var bY;
if((bX===(void 0))){
bY=%DateCurrentTime();
}else{
bY=(%_ToNumber(bX));
}
return %InternalDateFormat(bI,bY);
}
%DefineMethodsInternal(g.prototype,class{formatToParts(bX){
if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(27,"Intl.DateTimeFormat.prototype.formatToParts");
if(!(typeof(this)==='object')
){
throw %make_type_error(26,this);
}
if(!%IsInitializedIntlObjectOfType(this,'dateformat')){
throw %make_type_error(61,
'Intl.DateTimeFormat.prototype.formatToParts',
this);
}
var bY;
if((bX===(void 0))){
bY=%DateCurrentTime();
}else{
bY=(%_ToNumber(bX));
}
return %InternalDateFormatToParts(this,bY);
}},-1);
AddBoundMethod(g,'format',formatDate,1,'dateformat',
true);
function canonicalizeTimeZoneID(bZ){
if((bZ===(void 0))){
return bZ;
}
bZ=(%_ToString(bZ));
var ca=%StringToUpperCaseIntl(bZ);
if(ca==='UTC'||ca==='GMT'||
ca==='ETC/UTC'||ca==='ETC/GMT'){
return'UTC';
}
var aE=%regexp_internal_match(GetTimezoneNameCheckRE(),bZ);
if((aE===null))throw %make_range_error(172,bZ);
var aF=toTitleCaseTimezoneLocation(aE[1])+'/'+
toTitleCaseTimezoneLocation(aE[2]);
if(!(aE[3]===(void 0))&&3<aE.length){
var cb=%StringSplit(aE[3],'/',4294967295);
for(var Y=1;Y<cb.length;Y++){
aF=aF+'/'+toTitleCaseTimezoneLocation(cb[Y]);
}
}
return aF;
}
function CreateBreakIterator(B,C){
if((C===(void 0))){
C={__proto__:null};
}
var ac=getGetOption(C,'breakiterator');
var bh={__proto__:null};
defineWEProperty(bh,'type',ac(
'type','string',['character','word','sentence','line'],'word'));
var Z=resolveLocale('breakiterator',B,C);
var ai=%object_define_properties({__proto__:null},{
requestedLocale:{value:Z.locale,writable:true},
type:{value:bh.type,writable:true},
locale:{writable:true}
});
var cc=%CreateBreakIterator(Z.locale,b