mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
LibJS: Add the Temporal.now namespace object
This will be home to various functions: - Temporal.now.timeZone() - Temporal.now.instant() - Temporal.now.plainDateTime() - Temporal.now.plainDateTimeISO() - Temporal.now.zonedDateTime() - Temporal.now.zonedDateTimeISO() - Temporal.now.plainDate() - Temporal.now.plainDateISO() - Temporal.now.plainTimeISO()
This commit is contained in:
parent
8269921212
commit
7da1fcb2ef
4 changed files with 52 additions and 0 deletions
22
Userland/Libraries/LibJS/Runtime/Temporal/Now.h
Normal file
22
Userland/Libraries/LibJS/Runtime/Temporal/Now.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
namespace JS::Temporal {
|
||||
|
||||
class Now final : public Object {
|
||||
JS_OBJECT(Now, Object);
|
||||
|
||||
public:
|
||||
explicit Now(GlobalObject&);
|
||||
virtual void initialize(GlobalObject&) override;
|
||||
virtual ~Now() override = default;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue