Update About.tsx
This commit is contained in:
parent
d3a92a00d4
commit
9028f546c6
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ export default function About() {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Calculate age based on reference date (2010-11-08)
|
// Calculate age based on reference date (2010-11-08)
|
||||||
const referenceDate = new Date(2010, 10, 8); // November is 10 because months are 0-indexed
|
const referenceDate = new Date(2010, 11, 8); // November is 10 because months are 0-indexed
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
let calculatedAge = currentDate.getFullYear() - referenceDate.getFullYear();
|
let calculatedAge = currentDate.getFullYear() - referenceDate.getFullYear();
|
||||||
if (currentDate < new Date(currentDate.getFullYear(), referenceDate.getMonth(), referenceDate.getDate())) {
|
if (currentDate < new Date(currentDate.getFullYear(), referenceDate.getMonth(), referenceDate.getDate())) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue