Welcome, Guest.
Login
|
Register
Username:
Password:
Remember me:
how do i get the year using javascript
Please log in to post.
Watch thread
Unwatch thread
Started by
a.smith
29 Apr 2012 15:32
By
a.smith
(
204
)
On 29 Apr 2012 15:33
i want to be able to get the current year using Java Script so it automaticly says what the year is o.O sorry about my poor grammer xD
heres what i did,
<script type="text/Java Script">
var d=new Date();
document.write(d.getYear());
</script>
some reason it gives the value of
112
. any reason why?
By
Limxzero
(
5329
)
On 29 Apr 2012 17:33
Use
getFullYear();
The getYear() method gives you the number of years since 1900. Quirky millennium thing that should be avoided.
Catch my drift.
By
a.smith
(
204
)
On 29 Apr 2012 17:34
ohhhhhhhhh right xD
By
a.smith
(
204
)
On 29 Apr 2012 17:36
well i cant lock this so.. o-o
By
a.smith
(
204
)
On 29 Apr 2012 17:51
lol what? XD
Nintendo 3DS is ™ Nintendo Co. Ltd. This website is ©2009-2025 HullBreach Studios. All rights reserved.