mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
LibCore: Use new format functions in some places.
This commit is contained in:
parent
43e37c7cde
commit
c9ca897a45
7 changed files with 63 additions and 61 deletions
|
@ -251,7 +251,7 @@ String DateTime::to_string(const String& format) const
|
|||
|
||||
bool DateTime::is_before(const String& other) const
|
||||
{
|
||||
auto now_string = String::format("%04d%02d%02d%02d%02d%02dZ", year(), month(), weekday(), hour(), minute(), second());
|
||||
auto now_string = String::formatted("{:04}{:02}{:02}{:02}{:02}{:02}Z", year(), month(), weekday(), hour(), minute(), second());
|
||||
return __builtin_strcasecmp(now_string.characters(), other.characters()) < 0;
|
||||
}
|
||||
|
||||
|
@ -259,4 +259,5 @@ const LogStream& operator<<(const LogStream& stream, const DateTime& value)
|
|||
{
|
||||
return stream << value.to_string();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue