mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibJS: Add Date.prototype.toGMTString()
This commit is contained in:
parent
36ea9fbd9e
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