5 #ifndef V8_INTL_SUPPORT 6 #error Internationalization is expected to be enabled. 7 #endif // V8_INTL_SUPPORT 9 #ifndef V8_OBJECTS_JS_RELATIVE_TIME_FORMAT_INL_H_ 10 #define V8_OBJECTS_JS_RELATIVE_TIME_FORMAT_INL_H_ 12 #include "src/objects-inl.h" 13 #include "src/objects/js-relative-time-format.h" 16 #include "src/objects/object-macros.h" 22 ACCESSORS2(JSRelativeTimeFormat, locale, String, kLocaleOffset)
23 ACCESSORS(JSRelativeTimeFormat, icu_formatter,
24 Managed<icu::RelativeDateTimeFormatter>, kICUFormatterOffset)
25 SMI_ACCESSORS(JSRelativeTimeFormat, flags, kFlagsOffset)
27 inline void JSRelativeTimeFormat::set_style(Style style) {
28 DCHECK_GT(Style::COUNT, style);
30 hints = StyleBits::update(hints, style);
34 inline JSRelativeTimeFormat::Style JSRelativeTimeFormat::style()
const {
35 return StyleBits::decode(flags());
38 inline void JSRelativeTimeFormat::set_numeric(Numeric numeric) {
39 DCHECK_GT(Numeric::COUNT, numeric);
41 hints = NumericBits::update(hints, numeric);
45 inline JSRelativeTimeFormat::Numeric JSRelativeTimeFormat::numeric()
const {
46 return NumericBits::decode(flags());
49 CAST_ACCESSOR(JSRelativeTimeFormat);
54 #include "src/objects/object-macros-undef.h" 56 #endif // V8_OBJECTS_JS_RELATIVE_TIME_FORMAT_INL_H_