mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibJS: Pad abs(year) < 1000 with zeros in Date.prototype.toString()
This commit is contained in:
parent
a647f0abf6
commit
674f3d0347
1 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,8 @@ public:
|
|||
m_milliseconds = milliseconds;
|
||||
}
|
||||
|
||||
String date_string() const { return m_datetime.to_string("%a %b %d %Y"); }
|
||||
// FIXME: Support %04Y in Core::DateTime::to_string()
|
||||
String date_string() const { return String::formatted(m_datetime.to_string("%a %b %d {:04}"), m_datetime.year()); }
|
||||
// FIXME: Deal with timezones once SerenityOS has a working tzset(3)
|
||||
String time_string() const { return m_datetime.to_string("%T GMT+0000 (UTC)"); }
|
||||
String string() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue