diff options
author | Andreas Kling <kling@serenityos.org> | 2021-05-07 11:51:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-07 21:12:09 +0200 |
commit | 72259d5ceec74ec2719717ba233d6274cd8bca1f (patch) | |
tree | fdca8f8bdd633c5d0b6e6610c5b8b74580938441 /Userland/Libraries/LibJS/Runtime/Date.cpp | |
parent | e76956f7123e5ba9155dd6e48aad8bdac379c54b (diff) | |
download | serenity-72259d5ceec74ec2719717ba233d6274cd8bca1f.zip |
LibJS: Convert StringBuilder::appendf() => AK::Format
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Date.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Date.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Date.cpp b/Userland/Libraries/LibJS/Runtime/Date.cpp index 371c598065..c96addb14e 100644 --- a/Userland/Libraries/LibJS/Runtime/Date.cpp +++ b/Userland/Libraries/LibJS/Runtime/Date.cpp @@ -87,23 +87,23 @@ String Date::iso_date_string() const StringBuilder builder; if (year < 0) - builder.appendf("-%06d", -year); + builder.appendff("-{:06}", -year); else if (year > 9999) - builder.appendf("+%06d", year); + builder.appendff("+{:06}", year); else - builder.appendf("%04d", year); + builder.appendff("{:04}", year); builder.append('-'); - builder.appendf("%02d", month); + builder.appendff("{:02}", month); builder.append('-'); - builder.appendf("%02d", tm.tm_mday); + builder.appendff("{:02}", tm.tm_mday); builder.append('T'); - builder.appendf("%02d", tm.tm_hour); + builder.appendff("{:02}", tm.tm_hour); builder.append(':'); - builder.appendf("%02d", tm.tm_min); + builder.appendff("{:02}", tm.tm_min); builder.append(':'); - builder.appendf("%02d", tm.tm_sec); + builder.appendff("{:02}", tm.tm_sec); builder.append('.'); - builder.appendf("%03d", m_milliseconds); + builder.appendff("{:03}", m_milliseconds); builder.append('Z'); return builder.build(); |