Skip to content

Commit

Permalink
make current year dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-lee1 committed Oct 24, 2024
1 parent 1933169 commit cbf5d13
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions client/src/pages/CheckInForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,14 @@ const CheckInForm = (props) => {
'NOV',
'DEC',
];
const years = [
'2024',
'2023',
'2022',
'2021',
'2020',
'2019',
'2018',
'2017',
'2016',
'2015',
'2014',
'2013',
];
const currentYear = new Date().getFullYear();
const startYear = 2013;
const years = [];

for (let year = currentYear; year >= startYear; year--) {
years.push(year.toString());
}

const reasons = [
'--SELECT ONE--',
'Open Data',
Expand Down

0 comments on commit cbf5d13

Please sign in to comment.