Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: LadybirdBrowser/ladybird
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 26916d1baeafa5c32bea6d5de5b099a338d0ce0c
Choose a base ref
..
head repository: LadybirdBrowser/ladybird
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f88aabc525d28c66d601051c4396e4bd266cca96
Choose a head ref
Showing with 2 additions and 2 deletions.
  1. +1 −1 Libraries/LibJS/Runtime/DateConstructor.cpp
  2. +1 −1 Libraries/LibJS/Tests/builtins/Date/Date.parse.js
2 changes: 1 addition & 1 deletion Libraries/LibJS/Runtime/DateConstructor.cpp
Original file line number Diff line number Diff line change
@@ -174,6 +174,7 @@ static double parse_date_string(VM& vm, StringView date_string)
"%a%t%b%t%e%t%T%t%Y%t%z"sv, // "Wed Apr 17 23:08:53 2019 +0000"
"%Y-%m-%e%t%R%z"sv, // "2021-07-01 03:00Z"
"%a,%t%e%t%b%t%Y%t%T%t%z"sv, // "Wed, 17 Jan 2024 11:36:34 +0000"
"%a,%t%d%t%b%t%Y%t%T"sv, // "Thu, 09 Jan 2025 23:00:00"
"%a%t%b%t%e%t%Y%t%T%tGMT%t%x%t(%+)"sv, // "Sun Jan 21 2024 21:11:31 GMT 0100 (Central European Standard Time)"
"%Y-%m-%e%t%T"sv, // "2024-01-15 00:00:01"
"%a%t%b%t%e%t%Y%t%T%t%Z"sv, // "Tue Nov 07 2023 10:05:55 UTC"
@@ -191,7 +192,6 @@ static double parse_date_string(VM& vm, StringView date_string)
"%B%t%d%t%Y%t%T%t%z"sv, // "November 19 2024 00:00:00 +0900"
"%a%t%b%t%e%t%Y"sv, // "Wed Nov 20 2024"
"%Y-%m-%d%t%H:%M:%S%z"sv, // "2024-12-30 03:00:00+0000"
"%a,%t%d%t%b%t%Y%t%T"sv, // "Thu, 09 Jan 2025 23:00:00"
};

for (auto const& format : extra_formats) {
2 changes: 1 addition & 1 deletion Libraries/LibJS/Tests/builtins/Date/Date.parse.js
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ test("basic functionality", () => {
expect(Date.parse("2021-07-01 03:00Z")).toBe(1625108400000);
expect(Date.parse("2024-01-08 9:00Z")).toBe(1704704400000);
expect(Date.parse("Wed, 17 Jan 2024 11:36:34 +0000")).toBe(1705491394000);
expect(Date.parse("Thu, 09 Jan 2025 23:00:00")).toBe(1736460000000);
expect(Date.parse("Thu, 09 Jan 2025 23:00:00")).toBe(1736485200000);
expect(Date.parse("Sun Jan 21 2024 21:11:31 GMT 0100 (Central European Standard Time)")).toBe(
1705867891000
);