mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibJS: Replace the broken and unused Date::year getter
This commit is contained in:
parent
a7c265f341
commit
96ee5e36ed
Notes:
sideshowbarker
2024-07-18 17:11:31 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/96ee5e36eda Pull-request: https://github.com/SerenityOS/serenity/pull/7571
2 changed files with 2 additions and 3 deletions
|
@ -25,14 +25,13 @@ public:
|
|||
|
||||
int date() const { return datetime().day(); }
|
||||
int day() const { return datetime().weekday(); }
|
||||
int full_year() const { return datetime().year(); }
|
||||
int hours() const { return datetime().hour(); }
|
||||
u16 milliseconds() const { return m_milliseconds; }
|
||||
int minutes() const { return datetime().minute(); }
|
||||
int month() const { return datetime().month() - 1; }
|
||||
int seconds() const { return datetime().second(); }
|
||||
double time() const { return datetime().timestamp() * 1000.0 + milliseconds(); }
|
||||
int year() const { return datetime().day(); }
|
||||
int year() const { return datetime().year(); }
|
||||
|
||||
bool is_invalid() const { return m_is_invalid; }
|
||||
void set_is_invalid(bool value) { m_is_invalid = value; }
|
||||
|
|
|
@ -115,7 +115,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_full_year)
|
|||
if (this_object->is_invalid())
|
||||
return js_nan();
|
||||
|
||||
return Value(this_object->full_year());
|
||||
return Value(this_object->year());
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_full_year)
|
||||
|
|
Loading…
Reference in a new issue