9 lines
186 B
JavaScript
9 lines
186 B
JavaScript
|
function full_year(dt)
|
||
|
{
|
||
|
return dt.getFullYear();
|
||
|
}
|
||
|
dt = new Date();
|
||
|
console.log(full_year(dt));
|
||
|
|
||
|
dt = new Date(2015, 10, 1);
|
||
|
console.log(full_year(dt));
|