JavaScript Tutorial/Date/getFullYear

Материал из Web эксперт
Перейти к: навигация, поиск

Date().getFullYear()

The getFullYear() method returns the year in local time as a full four-digit number.



   <source lang="javascript">

<html> <head> <title>Combine Date Values</title> </head> <body> <script language="JavaScript" type="text/javascript">

</script> </body> </html></source>


Get Full year from current date

   <source lang="javascript">

<html> <head> <title>A Simple Page</title> <script language="JavaScript">

</script> </head> <body> </body> </html></source>