mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
LibJS: Parse date strings like "Wed Apr 17 23:08:53 +0000 2019"
The ECMAScript spec says that Date parsing can support any number of implementation-defined date formats. So let's support a format commonly used on the web. And let Core::DateTime do the heavy lifting. :^)
This commit is contained in:
parent
0f76e6e149
commit
0c63f0bf73
2 changed files with 20 additions and 6 deletions
|
@ -17,7 +17,7 @@ class Date final : public Object {
|
|||
public:
|
||||
static constexpr double time_clip = 8.64e15;
|
||||
|
||||
static Date* create(GlobalObject&, Core::DateTime, i16 milliseconds, bool is_invalid = false);
|
||||
static Date* create(GlobalObject&, Core::DateTime, i16 milliseconds, bool is_invalid);
|
||||
static Date* now(GlobalObject&);
|
||||
|
||||
Date(Core::DateTime datetime, i16 milliseconds, bool is_invalid, Object& prototype);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue