mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +00:00
LibCore: Add format option for DateTime::to_string() (#1358)
This commit is contained in:
parent
b6307beb6e
commit
10e0d4a196
2 changed files with 148 additions and 5 deletions
|
@ -26,7 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/String.h>
|
||||
#include <time.h>
|
||||
|
||||
namespace Core {
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
unsigned minute() const { return m_minute; }
|
||||
unsigned second() const { return m_second; }
|
||||
|
||||
String to_string() const;
|
||||
String to_string(const String& format = "%Y-%m-%d %H:%M:%S") const;
|
||||
|
||||
static DateTime now();
|
||||
static DateTime from_timestamp(time_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue