1
Fork 0
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:
asynts 2020-10-15 13:21:23 +02:00 committed by Andreas Kling
parent 43e37c7cde
commit c9ca897a45
7 changed files with 63 additions and 61 deletions

View file

@ -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();
}
}