-
-
\ No newline at end of file
diff --git a/js/age.js b/js/age.js
new file mode 100644
index 0000000..0c31204
--- /dev/null
+++ b/js/age.js
@@ -0,0 +1,10 @@
+function getAge(dateString) {
+ var today = new Date();
+ var birthDate = dateString;
+ var age = today.getFullYear() - birthDate.getFullYear();
+ var m = today.getMonth() - birthDate.getMonth();
+ if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
+ age--;
+ }
+ return age;
+}
\ No newline at end of file