-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix : 현재 년도에서 +1 년 -4년까지 학기를 선택할 수 있도록 학기와 관련된 select, dropdown 등을 자동…
…화시킴(#65)
- Loading branch information
Showing
4 changed files
with
56 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export const generateSemesters = (currentYear) => { | ||
const startYear = currentYear - 4; | ||
const endYear = currentYear + 1; | ||
const semesters = []; | ||
|
||
for (let year = startYear; year <= endYear; year += 1) { | ||
semesters.push(`${year}-01`); | ||
semesters.push(`${year}-02`); | ||
} | ||
|
||
return semesters; | ||
}; | ||
|
||
const currentDate = new Date(); | ||
export const currentYear = currentDate.getFullYear(); |