mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
LibJS: Add Date.prototype.toGMTString()
This commit is contained in:
parent
36ea9fbd9e
commit
093331df06
Notes:
sideshowbarker
2024-07-18 21:19:55 +09:00
Author: https://github.com/awesomekling
Commit: 093331df06
5 changed files with 20 additions and 0 deletions
|
@ -91,6 +91,13 @@ int Date::utc_seconds() const
|
|||
return to_utc_tm().tm_sec;
|
||||
}
|
||||
|
||||
String Date::gmt_date_string() const
|
||||
{
|
||||
// Mon, 18 Dec 1995 17:28:35 GMT
|
||||
// FIXME: Note that we're totally cheating with the timezone part here..
|
||||
return datetime().to_string("%a, %e %b %Y %T GMT");
|
||||
}
|
||||
|
||||
String Date::iso_date_string() const
|
||||
{
|
||||
auto tm = to_utc_tm();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue