mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:27:45 +00:00
LibJS: Pass valid offset string directly to CreateTemporalTimeZone
This is an editorial change in the Temporal spec. See: -75490b9
-8b70e4b
This commit is contained in:
parent
6d744eb4a7
commit
31283b5e64
3 changed files with 34 additions and 31 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -20,11 +20,13 @@ public:
|
|||
// Needs to store values in the range -8.64 * 10^13 to 8.64 * 10^13
|
||||
using OffsetType = double;
|
||||
|
||||
TimeZone(String identifier, Object& prototype);
|
||||
explicit TimeZone(Object& prototype);
|
||||
virtual ~TimeZone() override = default;
|
||||
|
||||
[[nodiscard]] String const& identifier() const { return m_identifier; }
|
||||
[[nodiscard]] Optional<OffsetType> const& offset_nanoseconds() const { return m_offset_nanoseconds; }
|
||||
|
||||
void set_identifier(String identifier) { m_identifier = move(identifier); };
|
||||
void set_offset_nanoseconds(OffsetType offset_nanoseconds) { m_offset_nanoseconds = offset_nanoseconds; };
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue