mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +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:
parent
65a927d16e
commit
7c66c5f12d
Notes:
sideshowbarker
2024-07-17 00:53:02 +09:00
Author: https://github.com/omprakaash 🔰
Commit: 7c66c5f12d
Pull-request: https://github.com/SerenityOS/serenity/pull/18915
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/cammo1123
Reviewed-by: https://github.com/caoimhebyrne ✅
Reviewed-by: https://github.com/krkk
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue