v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
js-date-time-format-inl.h
Go to the documentation of this file.
1
// Copyright 2018 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef V8_OBJECTS_JS_DATE_TIME_FORMAT_INL_H_
6
#define V8_OBJECTS_JS_DATE_TIME_FORMAT_INL_H_
7
8
#ifndef V8_INTL_SUPPORT
9
#error Internationalization is expected to be enabled.
10
#endif
// V8_INTL_SUPPORT
11
12
#include "
src/objects/js-date-time-format.h
"
13
// Include the non-inl header before the rest of the headers.
14
15
#include "
src/objects/objects-inl.h
"
16
17
// Has to be the last include (doesn't have include guards):
18
#include "
src/objects/object-macros.h
"
19
20
namespace
v8
{
21
namespace
internal
{
22
23
#include "torque-generated/src/objects/js-date-time-format-tq-inl.inc"
24
25
TQ_OBJECT_CONSTRUCTORS_IMPL
(JSDateTimeFormat)
26
27
ACCESSORS
(
JSDateTimeFormat
, icu_locale,
Tagged
<
Managed
<icu::Locale>>,
28
kIcuLocaleOffset)
29
ACCESSORS
(
JSDateTimeFormat
,
icu_simple_date_format
,
30
Tagged
<
Managed
<icu::SimpleDateFormat>>, kIcuSimpleDateFormatOffset)
31
ACCESSORS
(
JSDateTimeFormat
, icu_date_interval_format,
32
Tagged
<
Managed
<icu::DateIntervalFormat>>,
33
kIcuDateIntervalFormatOffset)
34
35
inline
void
JSDateTimeFormat
::set_hour_cycle(HourCycle hour_cycle) {
36
int
hints =
flags
();
37
hints = HourCycleBits::update(hints, hour_cycle);
38
set_flags(hints);
39
}
40
41
inline
JSDateTimeFormat::HourCycle
JSDateTimeFormat::hour_cycle
()
const
{
42
return
HourCycleBits::decode(
flags
());
43
}
44
45
inline
void
JSDateTimeFormat::set_date_style
(
46
JSDateTimeFormat::DateTimeStyle
date_style) {
47
int
hints =
flags
();
48
hints = DateStyleBits::update(hints,
date_style
);
49
set_flags(hints);
50
}
51
52
inline
JSDateTimeFormat::DateTimeStyle
JSDateTimeFormat::date_style
()
const
{
53
return
DateStyleBits::decode(
flags
());
54
}
55
56
inline
void
JSDateTimeFormat::set_time_style
(
57
JSDateTimeFormat::DateTimeStyle
time_style) {
58
int
hints =
flags
();
59
hints = TimeStyleBits::update(hints,
time_style
);
60
set_flags(hints);
61
}
62
63
inline
JSDateTimeFormat::DateTimeStyle
JSDateTimeFormat::time_style
()
const
{
64
return
TimeStyleBits::decode(
flags
());
65
}
66
67
}
// namespace internal
68
}
// namespace v8
69
70
#include "
src/objects/object-macros-undef.h
"
71
72
#endif
// V8_OBJECTS_JS_DATE_TIME_FORMAT_INL_H_
v8::internal::JSDateTimeFormat
Definition
js-date-time-format.h:37
v8::internal::JSDateTimeFormat::set_date_style
void set_date_style(DateTimeStyle date_style)
Definition
js-date-time-format-inl.h:45
v8::internal::JSDateTimeFormat::DateTimeStyle
DateTimeStyle
Definition
js-date-time-format.h:116
v8::internal::JSDateTimeFormat::hour_cycle
HourCycle hour_cycle() const
Definition
js-date-time-format-inl.h:41
v8::internal::JSDateTimeFormat::HourCycle
HourCycle
Definition
js-date-time-format.h:119
v8::internal::JSDateTimeFormat::set_time_style
void set_time_style(DateTimeStyle time_style)
Definition
js-date-time-format-inl.h:56
v8::internal::JSDateTimeFormat::time_style
DateTimeStyle time_style() const
Definition
js-date-time-format-inl.h:63
v8::internal::JSDateTimeFormat::date_style
DateTimeStyle date_style() const
Definition
js-date-time-format-inl.h:52
v8::internal::Managed
Definition
wasm-objects.h:67
v8::internal::Tagged
Definition
waiter-queue-node.h:21
js-date-time-format.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::flags
Flag flags[]
Definition
flags.cc:3797
v8::internal::icu_simple_date_format
icu_simple_date_format
Definition
js-date-time-format-inl.h:29
v8
Definition
api-arguments-inl.h:19
object-macros-undef.h
object-macros.h
ACCESSORS
#define ACCESSORS(holder, name, type, offset)
Definition
object-macros.h:279
TQ_OBJECT_CONSTRUCTORS_IMPL
#define TQ_OBJECT_CONSTRUCTORS_IMPL(Type)
Definition
object-macros.h:988
objects-inl.h
src
objects
js-date-time-format-inl.h
Generated on Sun Apr 6 2025 21:08:55 for v8 by
1.12.0