0
Need help JavaScript
hello guys , how can i get in which century the inserted date birth in input element, which syntax of javascript should I use ?
6 Answers
+ 1
Use getFullYear method of Date object.
https://code.sololearn.com/WBAdQciZEPxG/?ref=app
0
for exam! when you insert 010589 date birth so i can get the century of birth by year 1700 ot 1900 or 2000 like that
0
Try getFullYear()
0
when i have input in html then inserted date ! how to get the year ?
0
var year = document.getElementById('IdOfThatField').value;
- 1
Your question is unclear.. what do you mean by centry of your date of birth?