mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibJS: Replace the broken and unused Date::year getter
This commit is contained in:
parent
a7c265f341
commit
96ee5e36ed
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…
Add table
Add a link
Reference in a new issue