fix:add function calculateFiscalYear

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-02 13:13:53 +07:00
parent 4cc8fb0c1c
commit c966e1d961
3 changed files with 14 additions and 2 deletions

10
src/utils/function.ts Normal file
View file

@ -0,0 +1,10 @@
/**
*
*
* @param date
* @returns
*/
export function calculateFiscalYear(date: Date) {
const month = date.getMonth() + 1
return month >= 10 ? date.getFullYear() + 1 : date.getFullYear()
}