diff --git a/Userland/Libraries/LibCore/DateTime.cpp b/Userland/Libraries/LibCore/DateTime.cpp index 9554c3743b..6d5b62ba92 100644 --- a/Userland/Libraries/LibCore/DateTime.cpp +++ b/Userland/Libraries/LibCore/DateTime.cpp @@ -284,7 +284,7 @@ DeprecatedString DateTime::to_deprecated_string(StringView format) const return MUST(to_string(format)).to_deprecated_string(); } -Optional DateTime::parse(StringView format, DeprecatedString const& string) +Optional DateTime::parse(StringView format, StringView string) { unsigned format_pos = 0; diff --git a/Userland/Libraries/LibCore/DateTime.h b/Userland/Libraries/LibCore/DateTime.h index 0ace2eeca9..d15dc9f40c 100644 --- a/Userland/Libraries/LibCore/DateTime.h +++ b/Userland/Libraries/LibCore/DateTime.h @@ -37,7 +37,7 @@ public: static DateTime create(int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0); static DateTime now(); static DateTime from_timestamp(time_t); - static Optional parse(StringView format, DeprecatedString const& string); + static Optional parse(StringView format, StringView string); bool operator<(DateTime const& other) const { return m_timestamp < other.m_timestamp; } bool operator==(DateTime const& other) const { return m_timestamp == other.m_timestamp; }