1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:48:13 +00:00

LibWeb: Serialize Time according to spec

This commit is contained in:
stelar7 2023-05-27 22:19:43 +02:00 committed by Andreas Kling
parent b5ba479d65
commit e72b7c5de2

View file

@ -33,7 +33,7 @@ Time Time::percentage_of(Percentage const& percentage) const
ErrorOr<String> Time::to_string() const
{
return String::formatted("{}{}", m_value, unit_name());
return String::formatted("{}s", to_seconds());
}
float Time::to_seconds() const