mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +00:00
LibJS: Add Date methods: setHours, setMinutes, setSeconds, setMilliseconds
This commit is contained in:
parent
974a981ded
commit
43f0c92bcd
8 changed files with 190 additions and 1 deletions
|
@ -63,6 +63,11 @@ public:
|
|||
int utc_month() const;
|
||||
int utc_seconds() const;
|
||||
|
||||
void set_milliseconds(u16 milliseconds)
|
||||
{
|
||||
m_milliseconds = milliseconds;
|
||||
}
|
||||
|
||||
String date_string() const { return m_datetime.to_string("%a %b %d %Y"); }
|
||||
// FIXME: Deal with timezones once SerenityOS has a working tzset(3)
|
||||
String time_string() const { return m_datetime.to_string("%T GMT+0000 (UTC)"); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue