fix:add function calculateFiscalYear

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-02 13:21:41 +07:00
parent 72aa6f44ac
commit 27280c393f
5 changed files with 18 additions and 4 deletions

10
src/utils/functions.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();
}