Lines Matching defs:dateTimeFormat

326 // 13.1.1 InitializeDateTimeFormat (dateTimeFormat, locales, options)
329 const JSHandle<JSDateTimeFormat> &dateTimeFormat,
363 dateTimeFormat->SetCalendar(thread, calendar);
372 THROW_RANGE_ERROR_AND_RETURN(thread, "invalid calendar", dateTimeFormat);
381 dateTimeFormat->SetNumberingSystem(thread, numberingSystem);
391 THROW_RANGE_ERROR_AND_RETURN(thread, "invalid numberingSystem", dateTimeFormat);
431 dateTimeFormat->SetNumberingSystem(thread, result);
449 dateTimeFormat->SetTimeZone(thread, operationResult.GetValue());
461 THROW_RANGE_ERROR_AND_RETURN(thread, "invalid timeZone", dateTimeFormat);
477 THROW_REFERENCE_ERROR_AND_RETURN(thread, "can not find icu data resources", dateTimeFormat);
479 THROW_RANGE_ERROR_AND_RETURN(thread, "create icu::DateTimePatternGenerator failed", dateTimeFormat);
482 // b. Let hc be dateTimeFormat.[[HourCycle]].
520 // Set isHourDefined be false when dateTimeFormat.[[Hour]] is not undefined.
569 // Set dateTimeFormat.[[dateStyle]]
575 dateTimeFormat->SetDateStyle(dateStyle);
578 // Set dateTimeFormat.[[timeStyle]]
584 dateTimeFormat->SetTimeStyle(timeStyle);
589 // Set dateTimeFormat.[[HourCycle]] to hc.
597 // If dateTimeFormat.[[Hour]] is defined, then
599 // e. Set dateTimeFormat.[[HourCycle]] to hc.
603 // a. Set dateTimeFormat.[[HourCycle]] to undefined.
608 // Set dateTimeFormat.[[hourCycle]].
609 dateTimeFormat->SetHourCycle(dtfHourCycle);
611 // Set dateTimeFormat.[[icuLocale]].
612 JSDateTimeFormat::SetIcuLocale(thread, dateTimeFormat, icuLocale, JSDateTimeFormat::FreeIcuLocale);
615 // Set dateTimeFormat.[[icuSimpleDateFormat]].
624 THROW_TYPE_ERROR_AND_RETURN(thread, "Invalid option : option", dateTimeFormat);
656 SetIcuSimpleDateFormat(thread, dateTimeFormat, *simpleDateFormatIcu, JSDateTimeFormat::FreeSimpleDateFormat);
659 // Set dateTimeFormat.[[iso8601]].
661 dateTimeFormat->SetIso8601(thread, JSTaggedValue(iso8601));
663 // Set dateTimeFormat.[[locale]].
673 dateTimeFormat->SetLocale(thread, localeStr.GetTaggedValue());
675 // Set dateTimeFormat.[[boundFormat]].
676 dateTimeFormat->SetBoundFormat(thread, JSTaggedValue::Undefined());
678 // 39. Return dateTimeFormat.
679 return dateTimeFormat;
912 // 13.1.7 FormatDateTime(dateTimeFormat, x)
914 const JSHandle<JSDateTimeFormat> &dateTimeFormat, double x)
916 icu::SimpleDateFormat *simpleDateFormat = dateTimeFormat->GetIcuSimpleDateFormat();
925 // 1. Let parts be ? PartitionDateTimePattern(dateTimeFormat, x).
944 // 13.1.8 FormatDateTimeToParts (dateTimeFormat, x)
946 const JSHandle<JSDateTimeFormat> &dateTimeFormat, double x)
948 icu::SimpleDateFormat *simpleDateFormat = dateTimeFormat->GetIcuSimpleDateFormat();
1015 const JSHandle<JSTaggedValue> &dateTimeFormat)
1018 ASSERT_PRINT(dateTimeFormat->IsJSObject(), "dateTimeFormat is not object");
1020 // 2. If dateTimeFormat does not have an [[InitializedDateTimeFormat]] internal slot
1021 // and ? InstanceofOperator(dateTimeFormat, %DateTimeFormat%) is true, then
1022 // a. Let dateTimeFormat be ? Get(dateTimeFormat, %Intl%.[[FallbackSymbol]]).
1024 bool isInstanceOf = JSFunction::OrdinaryHasInstance(thread, env->GetDateTimeFormatFunction(), dateTimeFormat);
1025 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, dateTimeFormat);
1026 if (!dateTimeFormat->IsJSDateTimeFormat() && isInstanceOf) {
1028 OperationResult operationResult = JSTaggedValue::GetProperty(thread, dateTimeFormat, key);
1029 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, dateTimeFormat);
1033 // 3. Perform ? RequireInternalSlot(dateTimeFormat, [[InitializedDateTimeFormat]]).
1034 if (!dateTimeFormat->IsJSDateTimeFormat()) {
1039 // 4. Return dateTimeFormat.
1040 return dateTimeFormat;
1092 void JSDateTimeFormat::ResolvedOptions(JSThread *thread, const JSHandle<JSDateTimeFormat> &dateTimeFormat,
1117 JSHandle<JSTaggedValue> locale(thread, dateTimeFormat->GetLocale());
1122 JSMutableHandle<JSTaggedValue> calendarValue(thread, dateTimeFormat->GetCalendar());
1123 icu::SimpleDateFormat *icuSimpleDateFormat = dateTimeFormat->GetIcuSimpleDateFormat();
1127 if (dateTimeFormat->GetIso8601().IsTrue()) {
1141 JSHandle<JSTaggedValue> numberingSystem(thread, dateTimeFormat->GetNumberingSystem());
1149 JSMutableHandle<JSTaggedValue> timezoneValue(thread, dateTimeFormat->GetTimeZone());
1172 HourCycleOption hc = dateTimeFormat->GetHourCycle();
1175 hcValue = ToHourCycleEcmaString(thread, dateTimeFormat->GetHourCycle());
1190 if (dateTimeFormat->GetDateStyle() == DateTimeStyleOption::UNDEFINED &&
1191 dateTimeFormat->GetTimeStyle() == DateTimeStyleOption::UNDEFINED) {
1219 if (dateTimeFormat->GetDateStyle() != DateTimeStyleOption::UNDEFINED) {
1221 hcValue = ToDateTimeStyleEcmaString(thread, dateTimeFormat->GetDateStyle());
1225 if (dateTimeFormat->GetTimeStyle() != DateTimeStyleOption::UNDEFINED) {
1227 hcValue = ToDateTimeStyleEcmaString(thread, dateTimeFormat->GetTimeStyle());