mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:47:36 +00:00
LibJS: Pass prototype to Date constructor
This commit is contained in:
parent
2a15323029
commit
0df4d2823a
3 changed files with 13 additions and 4 deletions
|
@ -61,7 +61,7 @@ Value DateConstructor::construct(Interpreter& interpreter)
|
|||
gettimeofday(&tv, nullptr);
|
||||
auto datetime = Core::DateTime::now();
|
||||
auto milliseconds = static_cast<u16>(tv.tv_usec / 1000);
|
||||
return interpreter.heap().allocate<Date>(datetime, milliseconds);
|
||||
return Date::create(interpreter.global_object(), datetime, milliseconds);
|
||||
}
|
||||
|
||||
Value DateConstructor::now(Interpreter&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue