mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibJS: Support the yy{/,-}mm{/,-}dd hh:mm format for Date
Required by a UK news website for loading a Piano configuration. This is presumably configuration for piano.io Analytics.
This commit is contained in:
parent
5c8be3b072
commit
f0d0459c3e
2 changed files with 10 additions and 1 deletions
|
@ -84,3 +84,9 @@ test("mm/dd/yy hh:mm timezone-offset extension", () => {
|
|||
expect(Date.parse("12/05/2022 10:00 -0800")).toBe(1670263200000);
|
||||
expect(Date.parse("01/03/2023 10:00 -0800")).toBe(1672768800000);
|
||||
});
|
||||
|
||||
test("yy{/,-}mm{/,-}dd hh:mm extension", () => {
|
||||
// Example from a UK news website.
|
||||
expect(Date.parse("2014/11/14 13:05")).toBe(1415970300000);
|
||||
expect(Date.parse("2014-11-14 13:05")).toBe(1415970300000);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue