mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 09:37:17 +00:00
Prefer Date.getFullYear() (#920)
MDN says `.getYear` is deprecated. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getYear
This commit is contained in:
parent
6221af557d
commit
3df76aef6d
1 changed files with 1 additions and 1 deletions
|
|
@ -449,7 +449,7 @@ class System extends MakiObject {
|
|||
// returns the datetime's year since 1900
|
||||
getdateyear(datetime: number): number {
|
||||
const date = new Date(datetime * 1000);
|
||||
return date.getYear();
|
||||
return date.getFullYear() - 1900;
|
||||
}
|
||||
|
||||
// returns the datetime's month (0-11)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue