mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
LibJS: Require strict matching with a precise ZonedDateTime offset
This is a normative change in the Temporal proposal. See:
1117eaf
This commit is contained in:
parent
f091047159
commit
c8b4dc4847
Notes:
github-actions[bot]
2025-06-02 21:10:33 +00:00
Author: https://github.com/trflynn89
Commit: c8b4dc4847
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4966
3 changed files with 70 additions and 6 deletions
|
@ -630,6 +630,19 @@ ThrowCompletionOr<RelativeTo> get_temporal_relative_to_option(VM& vm, Object con
|
|||
|
||||
// iv. Set matchBehaviour to MATCH-MINUTES.
|
||||
match_behavior = MatchBehavior::MatchMinutes;
|
||||
|
||||
// v. If offsetString is not EMPTY, then
|
||||
if (offset_string.has_value()) {
|
||||
// 1. Let offsetParseResult be ParseText(StringToCodePoints(offsetString), UTCOffset[+SubMinutePrecision]).
|
||||
auto offset_parse_result = parse_utc_offset(*offset_string, SubMinutePrecision::Yes);
|
||||
|
||||
// 2. Assert: offsetParseResult is a Parse Node.
|
||||
VERIFY(offset_parse_result.has_value());
|
||||
|
||||
// 3. If offsetParseResult contains more than one MinuteSecond Parse Node, set matchBehaviour to MATCH-EXACTLY.
|
||||
if (offset_parse_result->seconds.has_value())
|
||||
match_behavior = MatchBehavior::MatchExactly;
|
||||
}
|
||||
}
|
||||
|
||||
// g. Let calendar be result.[[Calendar]].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue