summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatFunction.h
blob: aa39e223ba02665cd2308587c0511e0e71d83414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright (c) 2021, Tim Flynn <trflynn89@pm.me>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibJS/Forward.h>
#include <LibJS/Runtime/Completion.h>
#include <LibJS/Runtime/NativeFunction.h>

namespace JS::Intl {

class DateTimeFormatFunction final : public NativeFunction {
    JS_OBJECT(DateTimeFormatFunction, NativeFunction);

public:
    static DateTimeFormatFunction* create(GlobalObject&, DateTimeFormat&);

    explicit DateTimeFormatFunction(DateTimeFormat&, Object& prototype);
    virtual ~DateTimeFormatFunction() override = default;
    virtual void initialize(GlobalObject&) override;

    virtual ThrowCompletionOr<Value> call() override;

private:
    virtual void visit_edges(Visitor&) override;

    DateTimeFormat& m_date_time_format; // [[DateTimeFormat]]
};

}