mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibCore: Add format option for DateTime::to_string() (#1358)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user