Example. Return the year: var d = new Date(); var n = d.getFullYear();. The result of n will be: 2015. Try it yourself ». More "Try it Yourself" examples below.
www.google.com.tw