Skip to content

Commit 9b534f5

Browse files
authored
Merge pull request #18 from ynnnny/xwf
chore: 修改时间函数
2 parents 62f5769 + cac1af0 commit 9b534f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/GetYearSeason/getFormYear.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const getYear = () => {
22
const currentYear = new Date().getFullYear();
33
const years: { value: string; label: string }[] = [];
44
for (let year = currentYear; year > currentYear - 4; year--) {
5-
years.push({ value: year as unknown as string, label: year as unknown as string });
5+
years.push({ value: String(year), label: String(year) });
66
}
77
return years;
88
};

0 commit comments

Comments
 (0)