1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 11:27:35 +00:00

LibJS: Replace a DeprecatedString with String

Refactors Date class to use String instead of DeprecatedString.

Changes use of the Date class in DatePrototype accordingly.
This commit is contained in:
Om Prakaash 2023-05-18 17:46:01 -07:00 committed by Sam Atkins
parent 65a927d16e
commit 7c66c5f12d
3 changed files with 4 additions and 4 deletions

View file

@ -34,7 +34,7 @@ Date::Date(double date_value, Object& prototype)
{
}
DeprecatedString Date::iso_date_string() const
ErrorOr<String> Date::iso_date_string() const
{
int year = year_from_time(m_date_value);
@ -59,7 +59,7 @@ DeprecatedString Date::iso_date_string() const
builder.appendff("{:03}", ms_from_time(m_date_value));
builder.append('Z');
return builder.to_deprecated_string();
return builder.to_string();
}
// DayWithinYear(t), https://tc39.es/ecma262/#eqn-DayWithinYear